Difference between revisions of "UpdateGroupResourceIdPermission"
Nguyenduyan (talk | contribs) (Created page with "Category:Resource_Functions {{HelpFiles}} = updateGroupResourceIdPermission = Grant groups have permission to a resource == Syntax == updateGroupResourceIdPermission(...") |
(→Arguments) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 17: | Line 17: | ||
Permission constant: | Permission constant: | ||
− | * | + | * 0 "None" Resource_Permission_None (Remove access from resource) |
− | * | + | * 2 "Read" Resource_Permission_Read |
− | * | + | * 4 "Write" Resource_Permission_Write |
+ | |||
+ | * 6 "FullControl" Resource_Permission_FullControl | ||
== Return type == | == Return type == | ||
Line 41: | Line 43: | ||
updateGroupResourceIdPermission(resourceRId, groupPermission); | updateGroupResourceIdPermission(resourceRId, groupPermission); | ||
</source> | </source> | ||
+ | |||
+ | Access of the resource before grant | ||
+ | |||
+ | [[File:Access_before_grant.png]] | ||
+ | |||
+ | Access of the resource after grant | ||
+ | |||
+ | [[File:Access_after_grant.png]] |
Latest revision as of 03:31, 27 April 2022
updateGroupResourceIdPermission
Grant groups have permission to a resource
Syntax
updateGroupResourceIdPermission(resourceRId, groupPermission);
Arguments
resourceRId: number. Resource Id of a resource
groupPermission: Dictionary for group permission. EX: {groupRId1: permission, groupRId2: permission}.
Permission constant:
- 0 "None" Resource_Permission_None (Remove access from resource)
- 2 "Read" Resource_Permission_Read
- 4 "Write" Resource_Permission_Write
- 6 "FullControl" Resource_Permission_FullControl
Return type
Empty
Example
//grant permission for group to a resource
number resourceRId = 11088827;
number groupRId1 = 15596764;
number groupRId2 = 15085949;
number groupRId3 = 11051956;
Dictionary groupPermission = {
groupRId1: Resource_Permission_Read,
groupRId2: Resource_Permission_Write,
groupRId3: Resource_Permission_FullControl
};
updateGroupResourceIdPermission(resourceRId, groupPermission);
Access of the resource before grant
Access of the resource after grant