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:
Katie Smith
2019-03-14 16:55:48 +00:00
parent b0d3bd9046
commit 2aa14bc41c
5 changed files with 110 additions and 4 deletions

View File

@@ -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)