Skip to content

Commit

Permalink
Adds proxy model for "Permission" table to the users app (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
djperrefort authored Dec 8, 2023
1 parent a747892 commit 357d148
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
29 changes: 29 additions & 0 deletions keystone_api/apps/users/migrations/0002_permission.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated by Django 4.2.7 on 2023-12-08 17:11

import django.contrib.auth.models
from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('auth', '0012_alter_user_first_name_max_length'),
('users', '0001_initial'),
]

operations = [
migrations.CreateModel(
name='Permission',
fields=[
],
options={
'proxy': True,
'indexes': [],
'constraints': [],
},
bases=('auth.permission',),
managers=[
('objects', django.contrib.auth.models.PermissionManager()),
],
),
]
7 changes: 7 additions & 0 deletions keystone_api/apps/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ class Meta:
proxy = True


class Permission(auth_model.Permission):
"""Proxy model for the built-in django `Permission` model"""

class Meta:
proxy = True


class ResearchGroup(models.Model):
"""A user research group tied to a slurm account"""

Expand Down

0 comments on commit 357d148

Please sign in to comment.