UpdateGroupResourceIdPermission

From Catglobe Wiki
Revision as of 06:25, 7 December 2017 by Nguyenduyan (talk | contribs) (Created page with "Category:Resource_Functions {{HelpFiles}} = updateGroupResourceIdPermission = Grant groups have permission to a resource == Syntax == updateGroupResourceIdPermission(...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


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:

  • Resource_Permission_Read
  • Resource_Permission_Write
  • Resource_Permission_Full

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);