In some cases, it becomes useful to grant access to infobase to a person related to some object in infobase. For example, to let a contact person of a customer create orders or an employee view his salary and taxes.
To enable External users functionality, you must set UseExternalUsers constant value to True.
It is convenient to add this constant to GeneralSettings common form.
To manage external users, add External users to the content of the Settings subsystem.
To allow creating external users for items of Employees catalog add CatalogRef.Employees to types of ExternalAccess command parameter of ExternalUsers catalog.
To allow managing default roles for external users add External user groups to the content of the Settings subsystem.
To link external user groups with authorization objects (Employees), the AuthorizationObjectType attribute of ExternalUserGroup must contain CatalogRef.Employees type.
To link external users with authorization objects (Employees), the AuthorizationObject attribute of ExternalUser must contain CatalogRef.Employees type.
To allow user names to be updated when authorization object is changed add CatalogRef.Employees type to sources of UpdateExternalUserPresentation event subscription.
After an external user is created, it should have rights granted. To do this, there are two ways:
- To set roles directly to the user by setting Set roles directly checkbox.
- To include this user to an external user group and the user will have rights that were granted to that group. For that create a new user group named Employees, in Participant type select Employees from a drop-down list, add the created external user using Fill button and set roles on Allowed actions (roles) tab.
It is recommended to use external user groups as when you change allowed roles for the external user group, all users that are included in this group will be updated and have a new set of access rights.