forked from DGNum/gestioCOF
Use permissions to authenticate bds buro members
I prefer using a permission (namely `bds.is_team`) to determine if a user is member of the BDS staff rather that using a `is_buro` boolean field. We already use this approach is the kfet app
This commit is contained in:
parent
d2ba9471da
commit
4d5419fdbc
2 changed files with 23 additions and 1 deletions
22
bds/migrations/0003_staff_permission.py
Normal file
22
bds/migrations/0003_staff_permission.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Generated by Django 2.2.8 on 2019-12-20 22:48
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("bds", "0002_bds_group"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name="bdsprofile",
|
||||
options={
|
||||
"permissions": (("is_team", "est membre du burô"),),
|
||||
"verbose_name": "Profil BDS",
|
||||
"verbose_name_plural": "Profils BDS",
|
||||
},
|
||||
),
|
||||
migrations.RemoveField(model_name="bdsprofile", name="is_buro",),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue