This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20 R7
SET GROUP ACCESS

SET GROUP ACCESS 


 

SET GROUP ACCESS {( groups )} 
Parameter Type   Description
groups  Collection in Name of group(s) to which the 4D user account must belong during the session

The SET GROUP ACCESS command modifies the memberships of the 4D user account for the current session. It resets any former group membership and sets the new memberships to the listed groups

Notes: 

  • The scope of this command is the current session. Calling CHANGE CURRENT USER afterwards for example would reset defined memberships. 
  • This command can only be called from 4D remote or 4D single-user applications. It is not allowed on 4D Server. 

Pass in the groups parameter a collection of existing group name(s) to which the 4D user account must belong (if a group name does not exist, it is ignored). If you pass an empty collection, the 4D user account will no longer belong to any group. 

If you omit the groups parameter, the memberships of the 4D user account are reset to the group memberships stored on disk.

Note: When a group membership provides access to a "serialized" feature (e.g. a plug-in), a corresponding license is used and will remain attached to the 4D user account until the end of the session, even if the SET GROUP ACCESS command is called and group membership cancelled. 

Example  

You want to promote the current user to the "admin" and "plugins" groups for the session:

 $groups:=New collection("admin";"plugins")
 SET GROUP ACCESS($groups)



See also 

Get group access
Get plugin access
SET PLUGIN ACCESS
SET USER ALIAS

 
PROPERTIES 

Product: 4D
Theme: Users and Groups
Number: 1737

This command can be run in preemptive processesNot for server

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v18 R4

 
ARTICLE USAGE

4D Language Reference ( 4D v20 R7)