User permissions
Products: FastReport Cloud, FastReport Corporate Server, FastReport Publisher
User permissions, access rights — a system of differentiation and management of access to resources of the Service solutions. Access control is based on the principle of subjects to objects, where the subject is a user, group of users, other users of the workspace, or anonymous users, and the object is a resource of the Service solution.
Each resource can be assigned its own unique access rights. However, if they are not specified, the default rights specified in the workspace will be used. Through the user panel, it is not possible to regulate rights to each resource separately, this can be done through REST or SDK.
Properties
The user permissions model is available for each resource of the Service solution and contains the following data:
- Owner identifier — an anonymized user number.
- Permissions for the owner. Note that the user panel does not allow removing rights for the owner, but you can shoot yourself in the foot through REST or SDK.
- List of groups.
- Group identifier.
- Permissions for this group.
- Permissions for workspace users. Affects all workspace users regardless of group. By default, all workspace members have full permissions.
- Permissions for anonymous users.
Properties of Permissions
The property categories are common for each resource in the Service solution.
Get— getting information about the resource, such as the file name.Update— updating any properties of the resource, such as the subscription name.Create— creating or adding any information to the resource. It can also be adding new resources related to the specified one, such as creating a subscription group.Delete— deleting information directly related to the resource, such as excluding a user from a subscription.Execute— running the execution of a task, such as generating a report.Administrate— administering permissions, having access to these permissions allows you to modify other permissions, they provide the ability to fully administer the properties of permissions.
Each category has an
Allpermission, which will grant full rights to the resource, including any that may be added later.
Access Keys
Some types of models (such as files) can have access keys added to them — this is a list of objects with the following properties:
Name- a custom name for the key, to indicate its purpose.Expires- the date and time when the key will expire and stop working.Permissions- the permissions that the key grants when used.Key- the key itself, which needs to be passed as a request parameter to use it.
To use an access key, you simply need to pass the accessKey parameter in query, with the value of the Key field of the access key. In this case, the user (even anonymous) will be granted all the permissions that this key provides for the duration of the request.
Order of Checking
When a user sends a request to retrieve, modify, or delete a resource associated with a workspace, an access rights check is performed. If the resource access permission property is not set, it is taken from the default permissions in the workspace.
Request Your Own Permissions
Each user can request their own rights to a resource using REST or SDK. The returned model will contain an aggregation of all available rights. If the resource is not found or the user does not have rights to the resource, an empty model will be returned.