Add a new endpoint for managing a folder, use it to rename folder

- Add a GET / POST view: manage template folder
- Add a template for that view, where a user can rename their
folder
- Add an API client method for updating a folder

- Test the new feature, including the test that service without
permissions cannot manage a folder
This commit is contained in:
Pea Tyczynska
2018-11-12 16:37:37 +00:00
parent 0f90bde958
commit 565d29ed43
6 changed files with 118 additions and 0 deletions

View File

@@ -43,5 +43,11 @@ class TemplateFolderAPIClient(NotifyAdminAPIClient):
template_ids,
))
def update_template_folder(self, service_id, template_folder_id, name):
self.post(
'/service/{}/template-folder/{}'.format(service_id, template_folder_id),
{"name": name}
)
template_folder_api_client = TemplateFolderAPIClient()