PermissionAudit class: Difference between revisions
From Catglobe Wiki
More actions
No edit summary |
No edit summary |
||
| Line 25: | Line 25: | ||
number groupRId = 15729111; | number groupRId = 15729111; | ||
PermissionAudit perAudit = new PermissionAudit ({resourceRId},{userRId},{groupRId}); | PermissionAudit perAudit = new PermissionAudit ({resourceRId},{userRId},{groupRId}); | ||
print(perAudit.GetEffectivePermissionForGroup(resourceRId,groupRId)); | |||
print(perAudit.GetEffectivePermissionForUser(resourceRId,userRId)); | print(perAudit.GetEffectivePermissionForUser(resourceRId,userRId)); | ||
//Result return: | //Result return: | ||
Latest revision as of 07:51, 4 June 2021
PermissionAudit
Auditing permissions
Parent class
Inherits from object
Constructors
Methods
- int GetEffectivePermissionForGroup(int resourceId "Id of the resource to check access to", int groupResourceId "Group to check permission for") - Get the actual permission given to a given resource by the given group
- int GetEffectivePermissionForUser(int resourceId "Id of the resource to check access to", int userResourceId "User to check permission for") - Get the actual permission given to a given resource by the given user
- (From object) string ToString() - The string representation of the object.
Properties
- string ObjectTypeName { get; } - The name of the type of object.
- (From object) TypeInformation TypeInformation { get; } - Get information about this class.
Examples
number resourceRId = 15860101;
number userRId = 15864858;
number groupRId = 15729111;
PermissionAudit perAudit = new PermissionAudit ({resourceRId},{userRId},{groupRId});
print(perAudit.GetEffectivePermissionForGroup(resourceRId,groupRId));
print(perAudit.GetEffectivePermissionForUser(resourceRId,userRId));
//Result return:
//0: None (Resource_Permission_None)
//2: Read (Resource_Permission_Read)
//4: Write (Resource_Permission_Write)
//6: FullControl (Resource_Permission_FullControl)