Exemple #1
0
 private bool IsPermitted(OperationInspector inspector, Content content, string[] permissionNames)
 {
     if (permissionNames == null || permissionNames.Length == 0)
     {
         return(true);
     }
     return(inspector.CheckByPermissions(content, permissionNames));
 }
 private static bool FilterByRolesAndPermissions(OperationInspector inspector, string[] roles, string[] permissions, Content content)
 {
     if (roles.Length > 0 && !inspector.CheckByRoles(roles))
     {
         return(false);
     }
     if (permissions.Length > 0 && !inspector.CheckByPermissions(content, permissions))
     {
         return(false);
     }
     return(true);
 }