Commit 78af0e25 authored by Mathieu Giraud's avatar Mathieu Giraud

modules/defs.py.sample, models/VidjilAuth.py: LIMITED_ACCOUNTS can not change their password

Closes #3545.
parent 73927855
Pipeline #96951 passed with stages
in 7 minutes and 16 seconds
......@@ -4,6 +4,7 @@ from gluon.dal import Row, Set, Query
from enum import Enum
from permission_enum import PermissionEnum
import defs
class PermissionLetterMapping(Enum):
admin = 'e'
......@@ -317,7 +318,7 @@ class VidjilAuth(Auth):
:param: id should be an integer
'''
return self.is_admin() or self.user_id == id
return self.is_admin() or ((self.user_id == id) and (self.user_id not in defs.LIMITED_ACCOUNTS))
def can_modify(self, object_of_action, id, user = None):
'''
......
......@@ -9,6 +9,9 @@ SMTP_SERVER = 'localhost'
FROM_EMAIL = 'root@vidjil.org'
ADMIN_EMAILS = ['notifications@vidjil.org']
### Specific accounts
LIMITED_ACCOUNTS = [ ]
### address for the sql database
###
DB_ADDRESS = 'sqlite://storage.sqlite'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment