mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-05 06:01:46 -04:00
Delete cached template-folders when adding user to service
The api endpoint to get all template folders also returns the users who can see each folder. We need to clear the template-folder cache when adding a user to a service so that we are not using out of date data about who can see each folder.
This commit is contained in:
@@ -149,6 +149,7 @@ class UserApiClient(NotifyAdminAPIClient):
|
||||
return [User(data) for data in resp['data']]
|
||||
|
||||
@cache.delete('service-{service_id}')
|
||||
@cache.delete('service-{service_id}-template-folders')
|
||||
@cache.delete('user-{user_id}')
|
||||
def add_user_to_service(self, service_id, user_id, permissions, folder_permissions):
|
||||
# permissions passed in are the combined admin roles, not db permissions
|
||||
|
||||
Reference in New Issue
Block a user