# Security and Accounts

**URL:** <https://speciforum.org/t/security-and-accounts/539>\
**Category:** Configuration & Installation\
**Tags:** Specify-7, Members-only\
**Created:** [July 12, 2022, 9:22pm UTC](https://speciforum.org/t/security-and-accounts/539 "2022-07-12T21:22:28Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Grant](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/grant/32/4255_2.png) [@Grant](https://speciforum.org/u/Grant)\
**Post date:** [July 12, 2022, 9:22pm UTC](https://speciforum.org/t/security-and-accounts/539/1 "2022-07-12T21:22:28Z")

</div>

> 📖 This guide covers the Security and Accounts system and explains how to define user roles and assign them.

> [!caution] Before You Begin  
> It is highly advised that you read and understand [Specify Institutional Scopings](https://speciforum.org/t/specify-institutional-scopings/1046) before customizing user access and permissions.

# Security and Accounts

The **Security and Accounts** system in Specify 7 is a comprehensive **Role-Based Access Control (RBAC)** framework designed to give institutions precise control over data access and user privileges. It allows you to align software permissions with your real-world workflows, accommodating everyone from Collection Managers with full access to visiting researchers or students with limited views.

> [@Specify's Organizational Model and User Accounts for Multiple Collections](https://speciforum.org/t/specifys-organizational-model-and-user-accounts-for-multiple-collections/656):
>
> book This guide explains how data is shared across collections and how to access data from different collections. It breaks down different user scenarios, explains what permissions they might have, and describes what access and responsibilities they would have. Overview Specify supports data from multiple collections within a single database. For example, specimen records for fish and for birds are combined within the same data tables of a single database. For institutions with multiple col…

## Core Concepts

The system relies on three main components to manage access:

1. **Policies** : Individual permissions to perform a particular action, access a particular tool, or edit, view, or delete data in a table.

2. **Roles** : A defined set of policies (e.g., “Read-Only”, “Data Entry”, “Curator”) that controls access to specific tables, forms, and tools (like the WorkBench or Query Builder). Roles are created once and assigned to multiple users. Roles are specific to each **collection**.

3. **Administrators** :

> [!abstract] Permissions are _Additive_  
> Security in Specify 7 is **additive**. Users start with zero access.
> 
> Assigning a Role or Policy _adds_ permissions to their account. There is no “deny” setting—to restrict access to a function or table, simply ensure the user is not assigned a Role or Policy that grants it.

> [@Specify Permission System Introduction](https://speciforum.org/t/specify-7-7-0-permission-system-introduction/550):
>
> book This guide is a general introduction to the role-based access system for Specify 7. It explains key conceptualizations of the new system, provides a basic description of how it works, and suggests some likely usage scenarios. Introducing the Role-Based Access System in Specify 7 Specify 7.7 (July 2022) introduced a new, role-based access system for granting privileges to user accounts to access Specify components, data tables and fields. The new permissions system provides considerable…

* * *

To access the **Security and Accounts** panel, you must first navigate to the **User Tools** menu. You access this menu by clicking on your username in the navigation menu.

 ![User name selected in navigation menu|205x268,](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/b/b39ee81b4435499192eb4451ed3967cdfd919833.png)

Now click on :fingerprint_: **Security and Accounts**.

 ![User Tools with Security and Accounts highlighted](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/9/9ddb3d7674a9c8cc112a6fcd74b437a3e6613a21.png)

If your account has permission, you will now see this panel on the left:

 ![Security Panel](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/1X/ed9e3aadfa0ef4afb17c598311cc165257a1b070.png)

## User Roles

User Roles are a set of permission policies that apply to every user assigned that role. These roles are **managed under each collection.** A user assigned a role in one collection is not automatically assigned the same role in another.

 ![New Collection User Roles](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/0/08cf15a2d4b8bd66e3b686381533cd99c82366ff.png)

* * *

Add Role allows you to add a new role from an existing role or clicking on New to create an entirely new one.

 ![Add a role from an existing role](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/9/98476c4998340811a96ac8818414db96826dbd85.jpeg)

Import allows you to import a .json file of a user role(s).

If the name of the imported role(s) matches existing ones, it will prompt you to update your existing roles. If the name of the imported role is new you can add it to your role library.

 ![JSON importer](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/4/459db1d19540cd99a1dc5514b48e349de8f15002.png)

Export allows you to export a .json of your user roles.

* * *

In this instance, I am viewing the **Full Access** role that was created in my database.

 ![Full Access role](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/b/b3823440aac4c3225a1b51af7ed1dacbb00c485f.png)

| Name | Description | Example |
| --- | --- | --- |
| Name | Name of the role | Full Access, Collection Admin, Student, Guest |
| Description | Brief text field to give usage or additional information associated with the name | This is our role for student data entry personnel |

Under the **User Accounts** separator, you will see an Add button.

Clicking this will automatically open the Specify User query builder.

From here, you can configure a query and find exactly the user account you would like to add to the role:

 ![User Query](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/3/342214353ad9383a9598ccbc9b707af7150fe7b5.jpeg)

Once I have selected every agent I would like to assign the role to, I can click Select to continue.

 ![Selected user under User Accounts](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/c/c5a9c1f76255c81e916486630398ada15dfd087b.png)

**rmartin** now belongs to the **Full Access** role in my selected collection.

### Role Permission Policies (Policy Builder)

Using the **Policy Builder** (seen below) admin users can build the role’s policies. Some policies that apply only at the institution-level are not present at the collection-level.

* * *

In this example, the role **Limited Access** has the following two permissions:

 ![Policy Builder](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/e/e3cfd2de87a418f523176ac1b759ac2ab1f6b00b.png)

**Querybuilder** → All → Execute, Export, and Record Set creation permissions  
**Table** → **All Tables** → Read, Create, and Update permissions. No ability to delete entries in all tables.

* * *

The Policy Builder can be visualized as either as a grid or in-line rows. You can switch the view by clicking on the ![Switch](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/1X/8e4c8a1128d5acf81476c31d132da1872f367145.png) button.

You can delete policies by clicking on the ![Delete](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/1X/a0f861310be30ccde3464b633bc2406808664e4f.png) button on the left of each policy.

Clicking the Add button opens the new policy interface:

 ![Policy adder](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/8/8e7055256e145d2ae16f7fc6f5d05a5b287f5522.png)

#### All

The All option allows you to assign blanket permissions to every table and function in Specify. _ **This is generally not recommended** _, but it can allow you to quickly create a user with Read only permission.

 ![All option](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/1/157cc229dc1417dce24a21224f0cb9c57987f9e3.png)

#### Table

The Table option allows you to choose a specific table to grant Read, Create, Update, or Delete permissions to the role.

 ![Table option](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/3/311031b07843c3d98bde5d9c37fc162f3c73f302.png)

#### Tool

The Tool option grants permission to the many Specify tools. This includes the Schema Config, Query Builder, Record Sets, App Resources, Pick Lists, and Sp Audit Log querying.

 ![Tool option](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/d/de77a4c2764e583d7b762d06c9807447311a155c.png)

#### System

The System option grants access to collections.

![System option](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/0/0b8017da8ca46efdcf30c0357b812b0cb3cec770.png)

#### Report

The Report option grants the ability to execute reports.

#### Export

The Export option grants the ability to execute a DwCA export.

#### Permissions

The Permissions option allows users within the role to Read, Update, Create, Delete, or Copy From Library within the components of the Security and Accounts panel.

 ![Permissions option](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/e/e521d5cb1335dd94033f4456ce0c36e6e36107cb.png)

#### Tree

The Tree option grants the ability to Merge, Move, Synonymize, Desynonymize, Repair, or Bulk Move all or a subset of selected trees.

 ![Tree Option](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/0/09584dac0c2118efe7ae2156c1da155d49d529bf.png)

#### Querybuilder

The Querybuilder option grants the ability to Execute, Export, or Create a Record Set using the Query Builder.

 ![Querybuilder option](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/d/d464f1e9cb789ce8ce7ade754c90a9c0f51d46f4.png)

#### WorkBench

The Workbench option grants the ability to Create, Update, Delete, Upload, Unupload, Validate, Transfer, and Create Recordset using the WorkBench.

 ![Workbench Option](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/b/bb1fac5a4011ac4b89364ed8acdad87d9d072f3a.png)

#### Preferences

The Preferences option grants the user permissions to edit protected preferences.

> [!warning]  
> User preferences apply to current user only. No special permissions are required to edit most user preferences; however, some user preferences are protected as enabling them can cause data loss or database corruption if you are not careful. Users can only enable such options if they have been given “Preferences → User → Edit Protected” policy  
> Examples of protected options are “Allow dismissing error messages”, and “No restrictions mode” in the WorkBench and Query Builder.  
> ![Preferences option](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/9/939a9de6c9b9f4ff702f28ac46646fd3ccbfd951.png)

* * *

Remove deletes the user role. If the role has been assigned users, you will see a warning. The users will not be deleted but they will lose the assigned role.

Close closes the current view. If you have made changes, this will become a red Cancel button.

Export allows you to export the role. This is downloaded as a .json file and can be imported in any collection or database under the user roles.

Save commits the changes to the database.

* * *

> [!important]  
> To save a user role, you must ensure that every added policy has at least one checkbox activated. If you would like for the user to have no permissions in that table or function, make sure that no other policy grants that ability.

The Specify 7 permission system is additive. All users are implicitly denied all access. You can explicitly give some access. You cannot explicitly deny access. Instead, to remove some access, either unassign the user from the policy that gave them that access (would affect this user only), or remove the policy from the role definition (would affect all users with that role).

 ![Please check this box if you want to proceed warning](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/0/02be0ea6687404f2cf76a71db16a8527ea399cf6.png)

* * *

## User Permissions

When selecting or creating a user account there is the set of **User Permissions**. This includes the username, password, collection access, agent, user roles, custom policies, and Specify 6 permissions.

 ![User Permissions](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/c/c49bce8cba9090281a8d55d0316d19dfbe549b2f.png)

### Account Setup Options

**Name** is the username that the user will use when logging in to Specify.

Set Password opens the set password dialog.

Create Invite Link generates a sign-up link for a new user using [single sign on (SSO)](https://speciforum.org/t/single-sign-on-sso-support/537) if it is configured.

### Institution

_This will only be visible for administrators._

Checking **Institution Admin** gives absolute permission to everything in all collections. This should only be granted to trusted, admin level users.

You can also configure Institution-wide policies. This uses the same Policy Builder as the collection-level policy and User Role forms use. These policies will apply to all assigned collections.

Some policies are available on the institutional level only. Below is a list of some institution-level permissions (these can only be applied to individual users, not inside of roles):

| Relationship | Ability | Description |
| --- | --- | --- |
| Admin \> User \> Password | Update | Ability to change passwords |
| Admin \> User \> Agents | Update | Ability to reassign user account agent |
| Admin \> User \> Sp6 \> Is Admin | Update | Ability to make a user an admin |
| Admin \> User \> Sp6 \> Collection Access | Read | Grant Sp6 collection access |
| Admin \> User \> Sp6 \> Collection Access | Update | Grant Sp6 collection update access |
| Admin \> User \> Invite Link | Create | Allow user to create an invite link |
| Admin \> User \> Oic Providers | Read | Allow user to read OpenID providers |
| Export \> Feed | Force Update | Force an update of the RSS feed |
| Permissions \> Library \> Roles | Read | Allow a user to read user roles |
| Permissions \> Library \> Roles | Create | Allow a user to create a user role |
| Permissions \> Library \> Roles | Update | Allow a user to update a user role |
| Permissions \> Library \> Roles | Delete | Allow a user to delete a user role |

### Collection

Under this separator, you have several elements. First, you have the pick list with all collections in the database:

![Collection Pick List](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/1X/928c75772c878f41c83bd612b88c11d6e763266c.png)

Choosing a collection, making changes, then switching that collection does not lead to a loss of changes made in the first collection. The changes are there if you switch back to the previous collection, and can be saved permanently by pressing the Save button. Just because it is not visible does not mean it has been lost.

Under this, you will see the **Enable Collection Access** checkbox. This indicates whether the user has access to that collection or not.

The **Agent** query combobox allows you to select an agent in the database that corresponds to the user account.

![Agent combobox](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/optimized/2X/b/b780747ef05ef222f612c8a312fde8123079a84e_2_690x66.png)

### Assigned User Roles

You can check one or more user roles to assign to that user under the currently selected collection. The :pencil_: icon allows you to modify these roles.

 ![Assigned user roles](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/4/42f0bc465357273c7c13cc99625871497d31141e.png)

### Custom Collection-level Policies

For every user, you can specify individual policies that apply **only to the current collection**. This is not intended to be used in place of roles. These permissions are **additive** , only working to **grant new permissions, not take away**.

See **Policy Builder** for more information on how to build a policy.

### User’s Permission Profile (read-only)

You can click on this heading to expand the **User’s Permission Profile**. This is a **read-only** visualization of the user’s current permissions. At the top are all of the system tables and at the bottom you will see a collapsed _Advanced Tables_ section. The **Permission Profile** is an outcome of combining all the policies from the roles the user is part of and the roles that are directly assigned to the user at the institutional and collection level. You can click on any checkbox to see exactly where the user obtained the permission.

 ![User's Permission Profile](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/5/5a498366d9752644148fc2a6f243c5584883c207.png)

 ![Checkbox Permission Tracing](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/7/7f11411c56cee4d812973a8d50e80cc1ad948162.png)

Either to the right or below this visualization is the total system permission visual:

 ![Total System Permission visual](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/3/347334f0b19864d8a9cf2ffa0ba0018c9748455c.png)

### Specify 6 Permissions

Make Admin allows you to make the selected user an admin in Specify 6. Once the user has been made an admin, you can click Remove Admin to take this permission away.

Set Collections allows you to select which collections the user has access to in Specify 6.

 ![Set user collection access](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/a/a2b14b609468897111fd285e92c5a729706c4fa4.png)

The **User Group** pick list allows you to choose the group from Specify 6 that your user falls into. The permissions for these groups are set in [Specify 6’s security center](https://speciforum.org/t/adding-users-and-setting-permissions/238).

 ![User Groups in Specify 6](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/b/b42c3ce2365a8a0cb2d45f2028f80eb4f4439a78.png)

* * *

## Institution

Selecting your institution’s name from the panel on the left displays the institution name, all roles contained within, as well as user accounts defined in the institution.

 ![Institution panel](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/f/f6609eb91f12f50645bc5a403f1adc289fdf4d5e.png)

### **Institution Library of Role Templates**

This contains the list of role templates available at the Institution level. These can be created, exported, and importing under collections to be used across the database. These roles cannot be assigned to users directly, but are rather meant to be used as a template when creating roles on the collection level.

 ![Role Library](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/3/36d7dbe9807a0f4ba19c2f45247ac71cfca87ccb.png)

### User Accounts Defined in this Institution

This lists every user in the institution.

 ![User Accounts](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/f/f560c0620c7d3cfb699eea35ca2ea77d858dd614.png)

Each admin user will have their role shown to the right of their name.

> **abentley** (Specify 7 Admin) (Specify 6 Admin)

This indicates that **abentley** is an admin in both Specify 7 and 6.

## Collection(s)

This contains the list of roles available at the collection level. These can be created, exported for use in other collections, and roles can be imported under this collection.

 ![Collection User Roles](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/f/fd9beb2c66b32d66b7b66cc17f89edde8eed6272.png)

### User Accounts Assigned to this Collection

 ![User Accounts Assigned to this Collection](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/f/f98dec05721d980e99b6d994e0a5ad6de135991b.png)

Each user has their role in brackets to the right of their name.

> **abentley** (Collection Admin)

This indicates **abentley** has the **Collection Admin** role assigned to that user.

> **rmartin** (Full Access)

This indicates **rmartin** has the **Full Access** role assigned to that user.

---

_[View the full topic](https://speciforum.org/t/security-and-accounts/539)._
