bugfix in auth_deny
This commit is contained in:
parent
f2ec1a4994
commit
bd8aced23f
2 changed files with 21 additions and 3 deletions
18
input/migrations/0057_auto_20210104_0937.py
Normal file
18
input/migrations/0057_auto_20210104_0937.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 3.1.1 on 2021-01-04 09:37
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('input', '0056_auto_20201217_1215'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='project',
|
||||
name='account',
|
||||
field=models.CharField(choices=[('21111', '21111 Förderung (reaktiv)'), ('21112', '21112 WikiCon'), ('21115', '21115 Lokale Räume, Berlin'), ('21116', '21116 Lokale Räume, Hamburg'), ('21117', '21117 Lokale Räume, Hannover'), ('21118', '21118 Lokale Räume, Köln'), ('21119', '21119 Lokale Räume, München'), ('21120', '21120 Lokale Räume, Fürth'), ('21125', '21125 Lokale Räume, allgemein'), ('21130', '21130 GLAM-Förderung'), ('21131', '21131 Initiative Förderung'), ('21140', '21140 Wikipedia-Kampagne'), ('21141', '21141 Wikipedia-Onboarding'), ('21150', '21150 Fürsorge und Online-Kommunikationskultur')], max_length=5, null=True, verbose_name='Kostenstelle'),
|
||||
),
|
||||
]
|
|
@ -22,9 +22,9 @@ from .settings import IF_EMAIL
|
|||
def auth_deny(choice,pk,auth):
|
||||
if choice in ('BIB', 'ELIT', 'SOFT'):
|
||||
Library.set_granted(pk,auth)
|
||||
if choice == 'LIT':
|
||||
elif choice == 'LIT':
|
||||
Literature.set_granted(pk,auth)
|
||||
if choice == 'IFG':
|
||||
elif choice == 'IFG':
|
||||
IFG.set_granted(pk,auth)
|
||||
else:
|
||||
return HttpResponse(f'ERROR! UNKNWON CHOICE TYPE! {choice}')
|
||||
|
|
Loading…
Reference in a new issue