A client library for the Permissions API.
A client library for the Permissions API.
(update-resource-type _ id resource-type-name description)
Updates a resource type in the permissions service. Each resource type must have a unique name.
Updates a resource type in the permissions service. Each resource type must have a unique name.
(delete-subject _ id)
(delete-subject _ external-id subject-type)
Removes a subject from the permissions database.
Removes a subject from the permissions database.
(update-subject _ id external-id subject-type)
Updates a subject in the permissions service. The external-id field is the subject ID known to the client. For clients that use Grouper, this subject ID should be the same as the one used by Grouper. The subject ID must be unique within the permissions database. The subject-type field can be either 'user' or 'group'.
Updates a subject in the permissions service. The external-id field is the subject ID known to the client. For clients that use Grouper, this subject ID should be the same as the one used by Grouper. The subject ID must be unique within the permissions database. The subject-type field can be either 'user' or 'group'.
(add-resource-type _ resource-type-name description)
Adds a resource type to the permissions service. A resource type is a class of entities to which permissions may be assigned. For example, the Discovery Environment uses two resource types, 'app' and 'analysis', with individual apps or analyses being registered as resources of their respective types. Each resource type must have a unique name.
Adds a resource type to the permissions service. A resource type is a class of entities to which permissions may be assigned. For example, the Discovery Environment uses two resource types, 'app' and 'analysis', with individual apps or analyses being registered as resources of their respective types. Each resource type must have a unique name.
(delete-resource-type-by-name _ resource-type-name)
Removes the resource type with the given name from the permissions service. A resource type with associated resources may not be deleted.
Removes the resource type with the given name from the permissions service. A resource type with associated resources may not be deleted.
(get-subject-permissions _ subject-type subject-id lookup?)
(get-subject-permissions _ subject-type subject-id lookup? min-level)
Looks up permissions that have been granted to a subject. If the 'lookup?' flag is set to 'true' and the subject happens to be a user then the most privileged permissions available to the user or any group that the user belongs to (as determined by Grouper) will be listed. If the 'lookup?' flag is set to 'false' or the subject is a group then only permissions that were granted directly to the subject will be listed.
Looks up permissions that have been granted to a subject. If the 'lookup?' flag is set to 'true' and the subject happens to be a user then the most privileged permissions available to the user or any group that the user belongs to (as determined by Grouper) will be listed. If the 'lookup?' flag is set to 'false' or the subject is a group then only permissions that were granted directly to the subject will be listed.
(add-subject _ external-id subject-type)
Registers a subject in the permissions service. The external-id field is the subject ID known to the client. For clients that use Grouper, this subject ID should the same as the one used by Grouper. The subject ID must be unique within the permissions database. The subject-type field can be either 'user' or 'group'.
Registers a subject in the permissions service. The external-id field is the subject ID known to the client. For clients that use Grouper, this subject ID should the same as the one used by Grouper. The subject ID must be unique within the permissions database. The subject-type field can be either 'user' or 'group'.
(list-permissions _)
Lists all permissions known to the permissions service.
Lists all permissions known to the permissions service.
(list-resources _)
(list-resources _ opts)
Lists resources defined in the permissions service.
Lists resources defined in the permissions service.
(grant-permission _ resource-type resource-name subject-type subject-id level)
Grants permission to access a resource to a user. The resource-type, resource-name, subject-type, and subject-id fields have the same meanings as in the resources and subjects methods. Neither the resource nor the subject need to be registered before calling this ednpoint; they will be added to the database if necessary. The permission level must correspond to one of the available levels in the permissions service. The currently available levels are 'read', 'admin', 'write', and 'own'.
Grants permission to access a resource to a user. The resource-type, resource-name, subject-type, and subject-id fields have the same meanings as in the resources and subjects methods. Neither the resource nor the subject need to be registered before calling this ednpoint; they will be added to the database if necessary. The permission level must correspond to one of the available levels in the permissions service. The currently available levels are 'read', 'admin', 'write', and 'own'.
(list-subjects _)
(list-subjects _ opts)
Lists subjects defined in the permissions service.
Lists subjects defined in the permissions service.
(get-abbreviated-subject-permissions-for-resource-type _
subject-type
subject-id
resource-type
lookup?)
(get-abbreviated-subject-permissions-for-resource-type _
subject-type
subject-id
resource-type
lookup?
min-level)
Looks up permissions that have been granted to a subject for a single resource type. If the 'lookup?' flag
is set to 'true' and the subject happens to be a user then the most privileged permissions available to the
user or any group that the user belongs to (as determined by Grouper) will be listed. If the 'lookup?'
flag is set to 'false' or the subject is a group then only permissions that were granted directly to the
subject will be listed. The only difference between get-subject-permissions-for-resource-type
and this
method is that this one returns less information in order to reduce the amount of data that needs to be
serialized and deserialized.
Looks up permissions that have been granted to a subject for a single resource type. If the 'lookup?' flag is set to 'true' and the subject happens to be a user then the most privileged permissions available to the user or any group that the user belongs to (as determined by Grouper) will be listed. If the 'lookup?' flag is set to 'false' or the subject is a group then only permissions that were granted directly to the subject will be listed. The only difference between `get-subject-permissions-for-resource-type` and this method is that this one returns less information in order to reduce the amount of data that needs to be serialized and deserialized.
(delete-resource _ id)
(delete-resource _ resource-name resource-type)
Removes a resource from the permissions service.
Removes a resource from the permissions service.
(get-status _)
Retrieves information about the status of the permissions service.
Retrieves information about the status of the permissions service.
(add-resource _ resource-name resource-type)
Adds a resource to the permissions service. The resource-name field is the name or identifier that is used by the client to refer to the resource. This field must be unique among resources of the same type. The resource-type field is the name of the resource type, which must have been registered in the permission database already.
Adds a resource to the permissions service. The resource-name field is the name or identifier that is used by the client to refer to the resource. This field must be unique among resources of the same type. The resource-type field is the name of the resource type, which must have been registered in the permission database already.
(update-resource _ id resource-name)
Updates a resource in the permissions service. The resource-name field is the name or identifier that is used by the client to refer to the resource. This field must be unique among resources of the same type. The type of an existing resource may not be modified.
Updates a resource in the permissions service. The resource-name field is the name or identifier that is used by the client to refer to the resource. This field must be unique among resources of the same type. The type of an existing resource may not be modified.
(copy-permissions _ source-type source-id subjects)
Copies permissions from one subject to one or more other subjects. Only permissions that are assigned directly to the source subject are copied. The source-type parameter contains the type of the source subject. The source-id parameter contains the subject ID from Grouper. The subjects parameter contains a list of destination subjects, with each subject containing :subject_type and :subject_id keys.
Copies permissions from one subject to one or more other subjects. Only permissions that are assigned directly to the source subject are copied. The source-type parameter contains the type of the source subject. The source-id parameter contains the subject ID from Grouper. The subjects parameter contains a list of destination subjects, with each subject containing :subject_type and :subject_id keys.
(get-subject-permissions-for-resource-type _
subject-type
subject-id
resource-type
lookup?)
(get-subject-permissions-for-resource-type _
subject-type
subject-id
resource-type
lookup?
min-level)
Looks up permissions that have been granted to a subject for a single resource type. If the 'lookup?' flag is set to 'true' and the subject happens to be a user then the most privileged permissions available to the user or any group that the user belongs to (as determined by Grouper) will be listed. If the 'lookup?' flag is set to 'false' or the subject is a group then only permissions that were granted directly to the subject will be listed.
Looks up permissions that have been granted to a subject for a single resource type. If the 'lookup?' flag is set to 'true' and the subject happens to be a user then the most privileged permissions available to the user or any group that the user belongs to (as determined by Grouper) will be listed. If the 'lookup?' flag is set to 'false' or the subject is a group then only permissions that were granted directly to the subject will be listed.
(accessible-resource-query-dsl _ subject-ids resource-type)
(accessible-resource-query-dsl _ subject-ids resource-type min-level)
Returns the HoneySQL DSL representing a query that can be used to find resource IDs that are accessible to one or
more subjects. The subject-ids
argument should be an SQL array containing a list of subject IDs. The
resource-type
argument is the name of the resource type as defined in the permissions service. The min-level
argument is the minimum permission level required for the query. For example, if the min-level
parameter is
write
then resources for which the user or users have at most read
or admin
(limited write) access will not
be included in the result set.
Returns the HoneySQL DSL representing a query that can be used to find resource IDs that are accessible to one or more subjects. The `subject-ids` argument should be an SQL array containing a list of subject IDs. The `resource-type` argument is the name of the resource type as defined in the permissions service. The `min-level` argument is the minimum permission level required for the query. For example, if the `min-level` parameter is `write` then resources for which the user or users have at most `read` or `admin` (limited write) access will not be included in the result set.
(list-resource-types _)
(list-resource-types _ opts)
Lists resource types registered in the permissions service.
Lists resource types registered in the permissions service.
(delete-resource-type _ id)
Removes the resource type with the given ID from the permissions service. A resource type with associated resources may not be deleted.
Removes the resource type with the given ID from the permissions service. A resource type with associated resources may not be deleted.
(list-resource-permissions _ resource-type resource-name)
Lists all permissions associated with a resource.
Lists all permissions associated with a resource.
(get-subject-permissions-for-resource _
subject-type
subject-id
resource-type
resource-name
lookup?)
(get-subject-permissions-for-resource _
subject-type
subject-id
resource-type
resource-name
lookup?
min-level)
Looks up permissions that have been granted to a subject for a single resource. If the 'lookup?' flag is set to 'true' and the subject happens to be a user then the most privileged permissions available to the user or any group that the user belongs to (as determined by Grouper) will be listed. If the 'lookup?' flag is set to 'false' or the subject is a group then only permissions that were granted directly to the subject will be listed.
Looks up permissions that have been granted to a subject for a single resource. If the 'lookup?' flag is set to 'true' and the subject happens to be a user then the most privileged permissions available to the user or any group that the user belongs to (as determined by Grouper) will be listed. If the 'lookup?' flag is set to 'false' or the subject is a group then only permissions that were granted directly to the subject will be listed.
(revoke-permission _ resource-type resource-name subject-type subject-id)
Revokes a permission that has previously been granted.
Revokes a permission that has previously been granted.
(new-permissions-client)
(new-permissions-client base-url)
(new-permissions-client base-url schema-name)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close