public void ValidatePermissions(object oSecuredEntity, string[] PermissionsName, out string sFailedPermissionName) { if (!HasPermissions(oSecuredEntity, PermissionsName, out sFailedPermissionName)) { SecurityAccessException.Raise(oSecuredEntity.ToString(), sFailedPermissionName); } }
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); } }