Dump changes
This commit is contained in:
parent
b49c6ced26
commit
a4b572dcc7
40 changed files with 186 additions and 37 deletions
6
app/access_control/role.py
Normal file
6
app/access_control/role.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
from app.user.model import User
|
||||
|
||||
|
||||
def has_role(name: str, user: User):
|
||||
if user.role.name != name:
|
||||
raise Exception()
|
||||
Loading…
Add table
Add a link
Reference in a new issue