示例#1
0
        private bool CanListUsers(int CommunityId)
        {
            if (CommunityId <= 0)
            {
                //COPIA da SELETTORE UTENTI (SelectUserPresenter.cs)
                //

                ProfileManagement.ModuleProfileManagement module =
                    ProfileManagement.ModuleProfileManagement.CreatePortalmodule(UserContext.UserTypeID);

                ProfileManagement.Business.ProfileManagementService profileService =
                    new ProfileManagement.Business.ProfileManagementService(AppContext);


                List <Organization> organizations = profileService.GetAvailableOrganizations(UserContext.CurrentUserID,
                                                                                             (module.ViewProfiles || module.Administration)
                        ? SearchCommunityFor.SystemManagement
                        : SearchCommunityFor.CommunityManagement);

                return(organizations.Any() || module.Administration || module.ViewProfiles);
            }
            else
            {
                CommunityManagement.Business.ServiceCommunityManagement serviceCommunity = new CommunityManagement.Business.ServiceCommunityManagement(AppContext);

                DomainModel.Domain.ModuleCommunityManagement cModule = serviceCommunity.GetModulePermission(UserContext.CurrentUserID, CommunityId);

                return(cModule.Administration || cModule.Manage);
            }
        }
示例#2
0
 public MacProviderHelper(BaseModuleManager manager, UrlMacAuthenticationService uService, ProfileManagement.Business.ProfileManagementService pService)
 {
     UrlService     = uService;
     ProfileService = pService;
     CurrentManager = manager;
 }