Difference between revisions of "UpdateUserResourceIdPermission"

From Catglobe Wiki
Jump to: navigation, search
(Arguments)
(Arguments)
 
Line 17: Line 17:
 
Permission constant:
 
Permission constant:
  
* Resource_Permission_None or 0 or "None": Remove access from resource
+
* 0 "None" Resource_Permission_None  (Remove access from resource)
  
* Resource_Permission_Read or 2 or "Read"
+
* 2 "Read" Resource_Permission_Read
  
* Resource_Permission_Write or 4 or "Write"
+
* 4 "Write" Resource_Permission_Write
  
* Resource_Permission_FullControl or 6 or "FullControl"
+
* 6 "FullControl" Resource_Permission_FullControl
  
 
== Return type ==
 
== Return type ==

Latest revision as of 03:32, 27 April 2022


updateUserResourceIdPermission

Grant users have permission to a resource

Syntax

updateUserResourceIdPermission(resourceRId, userPermission);

Arguments

resourceRId: number. Resource Id of a resource

userPermission: Dictionary for user permission. EX: {userRId1: permission, userRId2: 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

number resourceRId = 15860001;  
number userRId1 = 15860010;
number userRId2 = 15864858;
number userRId3 = 15864853;
updateUserResourceIdPermission(resourceRId,{userRId1:2,userRId2:4,userRId3:6});