예제 #1
0
 public AccessType GetAccess(IService svc, UserRole role)
 {
     foreach (UserRoleServiceList ursvc in role.UserRoleServiceList)
     {
         if (ursvc.Service.ServiceID == svc.ServiceId)
         return (AccessType)ursvc.Operation;
     }
     return AccessType.None;
 }
예제 #2
0
 public AccessType GetAccess(IService svc, UserRole role)
 {
     return _UsersPermissions.GetOperation(role.ID, svc.ServiceId);
 }
예제 #3
0
파일: UserCtrl.cs 프로젝트: 5509850/baumax
 private void ApplyRoleView(UserRole role)
 {
     tabPage_Countries.PageEnabled = false;
     tabPage_Regions.PageEnabled = false;
     tabPage_Stores.PageEnabled = false;
     if (role != null)
     {
         //IAuthorizationService auth = ClientEnvironment.AuthorizationService;
         if (role.ID == (long) UserRoleId.CountryAdmin)
         {
             tabPage_Countries.PageEnabled = true;
         }
         if (role.ID == (long)UserRoleId.Controlling)
         {
             tabPage_Countries.PageEnabled = true;
         }
         else if (role.ID == (long)UserRoleId.RegionAdmin)
         {
             tabPage_Regions.PageEnabled = true;
         }
         else if (role.ID == (long) UserRoleId.StoreAdmin)
         {
             tabPage_Stores.PageEnabled = true;
         }
     }
 }
예제 #4
0
 public UserRoleName( long languageID, string name, UserRole userRole )
 {
     this._languageID = languageID;
     this._name = name;
     this._userRole = userRole;
 }