Overview
This guide is for administrators responsible for creating and managing user accounts, permissions, and access control in SASCOP BME SubTec.User Management Basics
SASCOP uses Django’s built-in User model:django.contrib.auth.models.User
Accessing User Management
Creating New Users
Complete Profile
Fill in additional information:
- First name
- Last name
- Email address
- Active (allows login)
- Staff status (admin access)
- Superuser status (full access)
Assign Groups
Add user to role-based groups:
- Project Managers
- Field Supervisors
- Accounting
- Read-Only Users
User Status Management
Active Status
is_active Flag
True: User can log in and access the systemFalse: User account is disabled
- Cannot log in
- Sessions are terminated
- Used for temporary suspension or departed employees
operaciones/views/registro_actividad.py
Staff Status
is_staff Flag
True: User can access Django admin interface at
/admin/False: No admin access (standard user)Staff status does NOT automatically grant all permissions - you must still assign specific permissions.
Superuser Status
is_superuser Flag
True: User has ALL permissions automatically
- Can modify any data
- Can create/delete users
- Can access all modules
- Bypasses all permission checks
Password Management
Setting Initial Password
When creating a user:- Enter password twice in creation form
- Password is automatically hashed
- Never store passwords in plain text
Password Requirements
bme_subtec/settings.py
- Not be similar to user information
- Meet minimum length
- Not be commonly used passwords
- Not be entirely numeric
Resetting User Password
Users cannot reset their own passwords. Contact your system administrator if you need to implement self-service password reset.
Email-Based Authentication
SASCOP allows users to log in with either username OR email:operaciones/views/login.py
Email Requirements
For email login to work:
- Email field must be filled in
- Email should be unique (not enforced by Django, but recommended)
- Email is case-insensitive
Permission Assignment
Using Groups (Recommended)
Create Groups
Django Admin > Groups > Add GroupExample groups:
- Project Managers
- Field Supervisors
- Accounting Staff
- Read-Only Users
Assign Permissions to Group
Select appropriate permissions:
- View permissions (view_*)
- Add permissions (add_*)
- Change permissions (change_*)
- Delete permissions (delete_*)
- Custom permissions (view_centro_consulta, etc.)
Direct Permission Assignment
For special cases, assign permissions directly:Select Permissions
Use filter and double-click to move permissions:
- From “Available permissions”
- To “Chosen permissions”
Viewing User Activity
Track what users are doing:operaciones/views/registro_actividad.py
User Listing API
For integration or custom interfaces:operaciones/views/registro_actividad.py
Best Practices
Use Groups
Assign permissions via groups for easier management
Least Privilege
Grant only minimum necessary permissions
Regular Audits
Review user accounts quarterly
Deactivate Promptly
Disable accounts immediately when users leave
Strong Passwords
Enforce password complexity requirements
Document Changes
Keep records of permission changes and reasons
Common Scenarios
New Field Supervisor
Create Account
Username: supervisor.lastname
Email: [email protected]
Temporary Contractor
Promoted Employee
Troubleshooting
User Cannot Log In
User Cannot Log In
Checklist:
- Is
is_activechecked? - Is password correct?
- Is account locked out?
- Check session timeout settings
User Cannot Access Feature
User Cannot Access Feature
Checklist:
- Does user have required permission?
- Is user in correct group?
- Is feature restricted by custom logic?
- Check activity log for denial reasons
Email Login Not Working
Email Login Not Working
Checklist:
- Is email field populated?
- Is email address correct?
- Try username instead
- Check for typos (case doesn’t matter)
Related Topics
User Permissions
User guide to understanding permissions
Activity Logs
Monitoring user activity