Beispiel #1
0
 public void ValidatePermissions(object oSecuredEntity, string[] PermissionsName, out string sFailedPermissionName)
 {
     if (!HasPermissions(oSecuredEntity, PermissionsName, out sFailedPermissionName))
     {
         SecurityAccessException.Raise(oSecuredEntity.ToString(), sFailedPermissionName);
     }
 }
Beispiel #2
0
        public void ValidatePermissions(string[] PermissionsName, out string sFailedPermissionName)
        {
            sFailedPermissionName = String.Empty;

            try
            {
                m_oSecurityCheck.ValidatePermissions(m_oServiceInfo, PermissionsName, out sFailedPermissionName);
            }
            catch (TisException)
            {
                SecurityAccessException.Raise(m_oServiceInfo.ServiceName, sFailedPermissionName);
            }
            catch (UnauthorizedAccessException)
            {
                SecurityAccessException.Raise(m_oServiceInfo.ServiceName, sFailedPermissionName);
            }
        }