Skip to content

Commit

Permalink
initial attempt to centralize permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
philtweir committed Jun 24, 2023
1 parent 08e76a7 commit b77e3a4
Show file tree
Hide file tree
Showing 7 changed files with 582 additions and 384 deletions.
6 changes: 6 additions & 0 deletions arches/app/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1466,6 +1466,12 @@ class Meta:
managed = True
db_table = "user_x_notification_types"

@receiver(post_save, sender=User)
def create_permissions_for_new_users(sender, instance, created, **kwargs):
from arches.app.utils.permission_backend import process_new_user

if created:
process_new_user(instance, created)

@receiver(post_save, sender=UserXNotification)
def send_email_on_save(sender, instance, **kwargs):
Expand Down
22 changes: 0 additions & 22 deletions arches/app/models/permissions.py

This file was deleted.

Loading

0 comments on commit b77e3a4

Please sign in to comment.