mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-18 21:48:49 -04:00
Set folder permissions when adding a user to a service
This sets the folder permissions for a user when adding them to a service. If a user is being added to a service after accepting an invite, we need to account for the possibility that the folders we are trying to add them to have been deleted before they accepted the invite.
This commit is contained in:
@@ -10,6 +10,10 @@ def dao_get_template_folder_by_id_and_service_id(template_folder_id, service_id)
|
||||
).one()
|
||||
|
||||
|
||||
def dao_get_valid_template_folders_by_id(folder_ids):
|
||||
return TemplateFolder.query.filter(TemplateFolder.id.in_(folder_ids)).all()
|
||||
|
||||
|
||||
@transactional
|
||||
def dao_create_template_folder(template_folder):
|
||||
db.session.add(template_folder)
|
||||
|
||||
Reference in New Issue
Block a user