mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-18 05:30:21 -04:00
Send updated user folder permissions to the API
Integrates the folder permissions form with the updated API endpoint to store changes in the user folders. Since user folder permissions are returned in the full list of template folders for the service we need to invalidate the cache key for it each time we update user permissions.
This commit is contained in:
@@ -420,7 +420,7 @@ PermissionsAbstract = type("PermissionsAbstract", (StripWhitespaceForm,), {
|
||||
class PermissionsForm(PermissionsAbstract):
|
||||
def __init__(self, all_template_folders=None, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
if all_template_folders:
|
||||
if all_template_folders is not None:
|
||||
self.folder_permissions.all_template_folders = all_template_folders
|
||||
self.folder_permissions.choices = [
|
||||
(item['id'], item['name']) for item in ([{'name': 'Templates', 'id': None}] + all_template_folders)
|
||||
|
||||
Reference in New Issue
Block a user