landing.site.setRights
Scope: catalog Permissions to execute: administrator
The method sets access permissions for site. Returns true or an error. The method is available for an account administrator only, including the Bitrix24 Cloud accounts for commercial subscriptions only.
Parameters
Parameter | Description | Available from version |
---|---|---|
id | Site identifier. | |
rights | Object with access permissions. Object keys are unique IDs (user IDs, department and group IDs, etc.), and the following available operations - are values:
Access permissions are independent and can be granted selectively. For example, user can have only access permission to publish without option to do any edits. The following values can be used as keys:
|
Example
BX24.callMethod( 'landing.site.setRights', { id: 645, rights: { 'U3': [ 'edit', 'delete' ], 'U1': [ 'edit', 'sett' ] } }, function(result) { if(result.error()) { console.error(result.error()); } else { console.info(result.data()); } } );
© «Bitrix24», 2001-2024