core(major): remove action field from policy
This commit is contained in:
parent
48c3f68cfc
commit
358e39ced0
|
@ -0,0 +1,17 @@
|
|||
# Generated by Django 2.2.6 on 2019-10-14 11:56
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('passbook_core', '0003_auto_20191011_0914'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='policy',
|
||||
name='action',
|
||||
),
|
||||
]
|
|
@ -186,15 +186,7 @@ class Policy(UUIDModel, CreatedUpdatedModel):
|
|||
"""Policies which specify if a user is authorized to use an Application. Can be overridden by
|
||||
other types to add other fields, more logic, etc."""
|
||||
|
||||
ACTION_ALLOW = 'allow'
|
||||
ACTION_DENY = 'deny'
|
||||
ACTIONS = (
|
||||
(ACTION_ALLOW, ACTION_ALLOW),
|
||||
(ACTION_DENY, ACTION_DENY),
|
||||
)
|
||||
|
||||
name = models.TextField(blank=True, null=True)
|
||||
action = models.CharField(max_length=20, choices=ACTIONS)
|
||||
negate = models.BooleanField(default=False)
|
||||
order = models.IntegerField(default=0)
|
||||
timeout = models.IntegerField(default=30)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
"""General fields"""
|
||||
|
||||
GENERAL_FIELDS = ['name', 'action', 'negate', 'order', 'timeout']
|
||||
GENERAL_FIELDS = ['name', 'negate', 'order', 'timeout']
|
||||
|
|
Reference in New Issue