Permissions Configuration

Version 10.1 by colinw on 2014/11/10 23:00

On this page:

Description

The Permissions resource provides access to query and define permissions for iSymphony. See the reference information below for details about the REST interactions used to define permissions. The rest of this description is provided to make it easier to understand the various interactions that go into the permission system in iSymphony.

Overview

In version 3.0 and previous of iSymphony, permissions were defined for 'permissible' objects in the system - each object that could be controlled via permissions (extensions, queues, other users, etc) would store a list of the users allowed to perform actions on it, and which actions each was allowed to perform. Beginning in version 3.1 of iSymphony, the situation has been reversed, to make it easier to administer permissions and hopefully less confusing. Permissions are defined for each user or user group in the system, in a cascading manner. They are evaluated in order of decreasing specificity, and in the case of a conflicting tie, the action is allowed. This must be considered when using the REST system to define permissions. See the documentation for permissions for more details.

Defaults

By default, all users in the system are allowed to perform all actions. Therefore, if a specific permission key has not been defined for a user (either on the user itself, or one of the groups it is a member of), that action should be considered allowed. When defining a permission, the default policy is also allowed, unless the allowed flag is set to false. 

Exceptions

The heart of the permission system lies in the exceptions to the rules. This allows for powerful combinations to be achieved. Generally, the objects defined by their UUIDs in the exceptions field will be allowed to perform an action if the allowed flag is false, and prevented from performing that action if the allowed flag is true. That is, they will follow the opposite of the general policy for that definition. There are a few special cases. 

Root Resource Paths

communication_manager/api/resource/core/{core_server_id}/permissions
communication_manager/api/resource/core/getBySlug/{core_server_slug}/permissions

JSON Representation

PermissionConfig
    {
       "key": "cellPhoneOriginateTo",
       "allowed": false,
       "exceptions": [
           "df41edec-2707-46eb-8b8f-146b01d9b29e"
        ],
       "inherited": false
    }

Property

Type

Description

key

String

The key used for this permission configuration.

allowed

Boolean

Whether the action should be generally allowed or not.

exceptions

Array of Strings (UUID)

The objects defined in the exceptions will be granted or denied access as exceptions to the general rule.

inherited

Boolean

Used internally. Should never be true when using the REST system.

Resource Paths

communication_manager/api/resource/core/{core_server_id}/permissions/userGroup/{user_group_id}

communication_manager/api/resource/core/getBySlug/{core_server_slug}/permissions/userGroup/{user_group_id}

Description

Retrieves permissions for the user group identified by the {user_group_id} path parameter.

Parameters:

  • core_server_id: The UUID of the core server.
  • core_server_slug: The unique identifying slug of the core server.
  • user_group_id: The UUID of the user group.

Errors:

  • 404 'No user group exists with that id.': Returned if the provided user_group_id does not match a user group in the system.

GET

Retrieves all permissions defined for the user group.

communication_manager/api/resource/core/{core_server_id}/permissions/userGroup/{user_group_id}/{key}

communication_manager/api/resource/core/getBySlug/{core_server_slug}/permissions/userGroup/{user_group_id}/{key}

Description

Retrieves or updates a specific permission for a user group.

Parameters:

  • core_server_id: The UUID of the core server. 
  • core_server_slug: The unique identifying slug of the core server.
  • user_group_id: The UUID of the user group.
  • key: The permission key identifying the permission.

Errors:

  • 404 'No user group exists with that id.': Returned if the provided user_group_id does not match a user group in the system.

GET

Retrieves a specific permission for the user group.

Errors:

  • 404 'No permission with that key is defined for that user group.': Returned if there is no permission defined for the user group with that permission key.

PUT 

Sets the permission definition for the user group with the specified key. The key defined in the permission definition body must match the key used in the URL.

Errors:

  • 412 'You must specify a key for a permission.': Returned if the permission definition that is supplied does not have a key defined.
  • 412 'You cannot specify an inherited permission. Remove the permission instead.': Returned if the inherited flag of the permission definition is set to true.

DELETE

Clears the specific permission definition for the user group.

Errors:

  • 404 'No permission with that key is defined for that user group.': Returned if there is no permission defined for the user group with that permission key.

communication_manager/api/resource/core/{core_server_id}/permissions/user/{user_id}

communication_manager/api/resource/core/getBySlug/{core_server_slug}/permissions/user/{user_id}

Description

Retrieves permissions for the user group identified by the {user_id} path parameter.

Parameters:

  • core_server_id: The UUID of the core server.
  • core_server_slug: The unique identifying slug of the core server.
  • user_id: The UUID of the user.

Errors:

  • 404 'No user exists with that id.': Returned if the provided user_id does not match a user in the system.

GET

Retrieves all permissions defined for the user.

communication_manager/api/resource/core/{core_server_id}/permissions/user/{user_id}/{key}

communication_manager/api/resource/core/getBySlug/{core_server_slug}/permissions/user/{user_id}/{key}

Description

Retrieves or updates a specific permission for a user group.

Parameters:

  • core_server_id: The UUID of the core server. 
  • core_server_slug: The unique identifying slug of the core server.
  • user_id: The UUID of the user.
  • key: The permission key identifying the permission.

Errors:

  • 404 'No user exists with that id.': Returned if the provided user_id does not match a user in the system.

GET

Retrieves a specific permission for the user.

Errors:

  • 404 'No permission with that key is defined for that user.': Returned if there is no permission defined for the user with that permission key.

PUT 

Sets the permission definition for the user with the specified key. The key defined in the permission definition body must match the key used in the URL.

Errors:

  • 412 'You must specify a key for a permission.': Returned if the permission definition that is supplied does not have a key defined.
  • 412 'You cannot specify an inherited permission. Remove the permission instead.': Returned if the inherited flag of the permission definition is set to true.

DELETE

Clears the specific permission definition for the user.

Errors:

  • 404 'No permission with that key is defined for that user.': Returned if there is no permission defined for the user with that permission key.

Curl Examples

Get

 

Update

 

Add

 

Delete

 
Created by colinw on 2014/11/10 22:21
   
iSymphony