action create project folders renamed to create project structure and allowed only on project

This commit is contained in:
iLLiCiTiT 2019-08-12 17:48:41 +02:00
parent 8c2f731149
commit 4d221e91e2

View file

@ -13,9 +13,9 @@ class CreateProjectFolders(BaseAction):
'''Edit meta data action.'''
#: Action identifier.
identifier = 'create.project.folders'
identifier = 'create.project.structure'
#: Action label.
label = 'Create Project Folders'
label = 'Create Project Structure'
#: Action description.
description = 'Creates folder structure'
#: roles that are allowed to register this action
@ -31,6 +31,11 @@ class CreateProjectFolders(BaseAction):
def discover(self, session, entities, event):
''' Validation '''
if len(entities) != 1:
return False
if entities[0].entity_type.lower() != "project":
return False
return True