Метод | Описание | |
---|---|---|
AllowAllUsers ( ISecured entity, string action, RockContext rockContext = null ) : void |
Allows all users.
|
|
AllowPerson ( ISecured entity, string action, Person person, RockContext rockContext = null ) : void |
Updates authorization rules for the entity so that the current person is allowed to perform the specified action.
|
|
AllowSecurityRole ( ISecured entity, string action, Group group, RockContext rockContext = null ) : void |
Allows the security role.
|
|
AuthRules ( int entityTypeId, int entityId, string action ) : List |
Returns the authorization rules for the specified entity and action.
|
|
Authorized ( ISecured entity, string action, Rock person ) : bool |
Evaluates whether a selected person is allowed to perform the selected action on the selected entity.
|
|
Authorized ( ISecured entity, string action, SpecialRole specialRole ) : bool |
Evaluates whether a selected user is allowed to perform the selected action on the selected entity.
|
|
CopyAuthorization ( ISecured sourceEntity, ISecured targetEntity ) : void |
Copies the authorization.
|
|
CopyAuthorization ( ISecured sourceEntity, ISecured targetEntity, RockContext rockContext, string action = "" ) : void |
Copies the authorizations from one ISecured object to another This method will save any previous changes made to the context |
|
DecodeEntityTypeName ( string encodedTypeName ) : string |
Decodes the entity type name.
|
|
EncodeEntityTypeName ( |
Encodes the entity type name for use in a URL
|
|
EncodeEntityTypeName ( string assemblyQualifiedName ) : string |
Encodes the entity type name for use in a URL
|
|
FindAuthRules ( ISecured securableObject ) : IQueryable |
Finds the auth rules.
|
|
Flush ( ) : void |
Clear the static Authorizations object
|
|
IsPrivate ( ISecured entity, string action, Person person ) : bool |
Determines whether the specified entity is private. Entity is considered private if only the current user has access. In this scenario, the first rule would give current user access, and second rule would deny all users.
|
|
Load ( ) : bool |
Load the static Authorizations object
|
|
MakePrivate ( ISecured entity, string action, Person person, RockContext rockContext = null ) : void |
Makes the entity private by setting up two authorization rules, one granting the selected person, and then another that denies all other users.
|
|
MakeUnPrivate ( ISecured entity, string action, Person person, RockContext rockContext = null ) : void |
Removes that two authorization rules that made the entity private.
|
|
RefreshAction ( int entityTypeId, int entityId, string action, RockContext rockContext ) : void |
Reloads the action.
|
|
ReloadAction ( int entityTypeId, int entityId, string action ) : void |
Reloads the action.
|
|
ReloadAction ( int entityTypeId, int entityId, string action, RockContext rockContext ) : void |
Reloads the action.
|
|
ReloadEntity ( int entityTypeId, int entityId, RockContext rockContext = null ) : void |
Reloads the entity.
|
|
SetAuthCookie ( string userName, bool isPersisted, bool IsImpersonated ) : void |
Sets the auth cookie.
|
Метод | Описание | |
---|---|---|
FlushAuth ( ) : void |
Clear the static Authorizations object
|
|
ItemAuthorized ( ISecured entity, string action, Rock person, bool isRootEntity, bool checkParentAuthority ) : bool? |
Checks to see if a person is authorized
|
|
ItemAuthorized ( ISecured entity, string action, SpecialRole specialRole, bool isRootEntity, bool checkParentAuthority ) : bool? |
Checks to see if a special role is authorized
|
|
LoadAuths ( int entityTypeId, int entityId, RockContext rockContext ) : List |
Loads the authorizations
|
|
MyAllow ( ISecured entity, string action, Person person = null, Group group = null, SpecialRole specialRole = SpecialRole.None, RockContext rockContext = null ) : void |
Creates authorization rules to make the entity private to selected person
|
|
MyAllowAllUsers ( ISecured entity, string action, RockContext rockContext ) : void |
Mies the allow all users.
|
|
MyMakePrivate ( ISecured entity, string action, Person person, RockContext rockContext ) : void |
Makes the entity private for the selected action and person
|
|
MyMakeUnPrivate ( ISecured entity, string action, Person person, RockContext rockContext ) : void |
If the entity is currently private for selected person, removes all the rules
|
|
RefreshAction ( int entityTypeId, int entityId, string action ) : void |
Reloads the authorizations for the specified entity and action.
|
|
RefreshEntity ( int entityTypeId, int entityId, RockContext rockContext = null ) : void |
Reloads the entity.
|
|
ResetAction ( int entityTypeId, int entityId, string action, List |
Resets the action.
|
public static AllowAllUsers ( ISecured entity, string action, RockContext rockContext = null ) : void | ||
entity | ISecured | The entity. |
action | string | The action. |
rockContext | RockContext | The rock context. |
Результат | void |
public static AllowPerson ( ISecured entity, string action, Person person, RockContext rockContext = null ) : void | ||
entity | ISecured | The entity. |
action | string | The action. |
person | Person | The person. |
rockContext | RockContext | The rock context. |
Результат | void |
public static AllowSecurityRole ( ISecured entity, string action, Group group, RockContext rockContext = null ) : void | ||
entity | ISecured | The entity. |
action | string | The action. |
group | Group | The group. |
rockContext | RockContext | The rock context. |
Результат | void |
public static AuthRules ( int entityTypeId, int entityId, string action ) : List |
||
entityTypeId | int | The entity type id. |
entityId | int | The entity id. |
action | string | The action. |
Результат | List |
public static Authorized ( ISecured entity, string action, Rock person ) : bool | ||
entity | ISecured | The entity. |
action | string | The action. |
person | Rock | The person. |
Результат | bool |
public static Authorized ( ISecured entity, string action, SpecialRole specialRole ) : bool | ||
entity | ISecured | The entity. |
action | string | The action. |
specialRole | SpecialRole | The special role. |
Результат | bool |
public static CopyAuthorization ( ISecured sourceEntity, ISecured targetEntity ) : void | ||
sourceEntity | ISecured | The source entity. |
targetEntity | ISecured | The target entity. |
Результат | void |
public static CopyAuthorization ( ISecured sourceEntity, ISecured targetEntity, RockContext rockContext, string action = "" ) : void | ||
sourceEntity | ISecured | The source entity. |
targetEntity | ISecured | The target entity. |
rockContext | RockContext | The rock context. |
action | string | Optional action (if ommitted or left blank, all actions will be copied). |
Результат | void |
public static DecodeEntityTypeName ( string encodedTypeName ) : string | ||
encodedTypeName | string | Name of the encoded type. |
Результат | string |
public static EncodeEntityTypeName ( |
||
iSecuredType | Type of the item to secure. | |
Результат | string |
public static EncodeEntityTypeName ( string assemblyQualifiedName ) : string | ||
assemblyQualifiedName | string | Assembly name of the item to secure. |
Результат | string |
public static FindAuthRules ( ISecured securableObject ) : IQueryable |
||
securableObject | ISecured | The securable object. |
Результат | IQueryable |
public static IsPrivate ( ISecured entity, string action, Person person ) : bool | ||
entity | ISecured | The entity. |
action | string | The action. |
person | Person | The person. |
Результат | bool |
public static MakePrivate ( ISecured entity, string action, Person person, RockContext rockContext = null ) : void | ||
entity | ISecured | The entity. |
action | string | The action. |
person | Person | The person. |
rockContext | RockContext | The rock context. |
Результат | void |
public static MakeUnPrivate ( ISecured entity, string action, Person person, RockContext rockContext = null ) : void | ||
entity | ISecured | The entity. |
action | string | The action. |
person | Person | The person. |
rockContext | RockContext | The rock context. |
Результат | void |
public static RefreshAction ( int entityTypeId, int entityId, string action, RockContext rockContext ) : void | ||
entityTypeId | int | The entity type identifier. |
entityId | int | The entity identifier. |
action | string | The action. |
rockContext | RockContext | The rock context. |
Результат | void |
public static ReloadAction ( int entityTypeId, int entityId, string action ) : void | ||
entityTypeId | int | The entity type identifier. |
entityId | int | The entity identifier. |
action | string | The action. |
Результат | void |
public static ReloadAction ( int entityTypeId, int entityId, string action, RockContext rockContext ) : void | ||
entityTypeId | int | The entity type identifier. |
entityId | int | The entity identifier. |
action | string | The action. |
rockContext | RockContext | The rock context. |
Результат | void |
public static ReloadEntity ( int entityTypeId, int entityId, RockContext rockContext = null ) : void | ||
entityTypeId | int | The entity type identifier. |
entityId | int | The entity identifier. |
rockContext | RockContext | The rock context. |
Результат | void |
public static SetAuthCookie ( string userName, bool isPersisted, bool IsImpersonated ) : void | ||
userName | string | Name of the user. |
isPersisted | bool | if set to |
IsImpersonated | bool | if set to |
Результат | void |