Authentication for clinicedc/edc projects.
Project description
edc-auth
Authentication and permissions for the Edc
Default Groups
The default groups are required for the normal operation of an EDC deployment. The default groups are:
ACCOUNT_MANAGER: members may add/change and delete user accounts
ADMINISTRATION: members may view the Administration page
AUDITOR: members may view all forms but have no add/change permissions.
CLINIC: members may add/edit/delete all CRFs, Requisitions, Actions and other required clinic trial data entry forms. They may also view the Requisition page of the Lab section;
EVERYONE: members may access the EDC;
LAB: members may perform all functions in the Lab section (Edit requisitions, receive, process, pack, manage manifests, etc);
PHARMACY:
PII: members may view all personally identifiable data and edit forms that manage such data (Screening, Consents, Patient registration);
PII_VIEW: members may view personally identifiable data but have no add/edit permissions for any of the forms that store such data.
Permissions
Permissions use Django’s permission framework, therefore, all permissions are linked to some model.
Permissions don’t always naturally link to a model. In such cases, a dummy model is created. For example, with Navigation bars from edc_navbar. Permissions to follow an item on a navigation bar are associated with model edc_navbar.Navbar. A similar approach is used for listboard permissions using edc_dashboard.Dashboard.
Importing users
You create user accounts by importing a specially formatted CSV file. Once an account is created a “Welcome” email may be sent.
Import users from a CSV file with columns:
username
first_name
last_name
job_title
email
alternate_email
mobile
sites: a comma-separated list of sites
groups: a comma-separated list of groups
Then import the users from your application commandline
python manage.py import_users --csvfile=/Users/erikvw/meta_users.csv --notify-to-test-email=ew2789@gmail --resource-name=meta.clinicedc.org --resend-as-new
Legacy notes
Important: If you are upgrading from edc_base.auth:
The userprofile table is now in edc_auth. edc_auth has one migration for this table. Copy the same table from edc_base and fake the edc_auth migration.
CREATE TABLE edc_auth_userprofile LIKE edc_base_userprofile;
INSERT edc_auth_userprofile SELECT * FROM edc_base_userprofile;
python manage.py migrate edc_auth --fake
You can now run the edc_base migration safely.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file edc_auth-0.1.52-py3-none-any.whl
.
File metadata
- Download URL: edc_auth-0.1.52-py3-none-any.whl
- Upload date:
- Size: 68.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a8187b035e5a088ad2922ba3d2d2aab5e268cdd131ec0939e8066bfd39b3545 |
|
MD5 | 24ffaacda8f63b44d8c223909a743648 |
|
BLAKE2b-256 | 2b8c972354316f587dcc8637293a51d971077d536417eb0676906dcf5125e75f |