only show edit workspace link to users who have permission, plus

formatting
This commit is contained in:
dandds
2018-09-17 13:34:14 -04:00
parent bba2a2b283
commit 5a3871154b
3 changed files with 22 additions and 8 deletions

View File

@@ -39,7 +39,10 @@ class Workspaces(object):
def get_for_update_information(cls, user, workspace_id):
workspace = WorkspacesQuery.get(workspace_id)
Authorization.check_workspace_permission(
user, workspace, Permissions.EDIT_WORKSPACE_INFORMATION, "update workspace information"
user,
workspace,
Permissions.EDIT_WORKSPACE_INFORMATION,
"update workspace information",
)
return workspace

View File

@@ -5,4 +5,13 @@ from .forms import ValidatedForm
class WorkspaceForm(ValidatedForm):
name = StringField("Workspace Name", validators=[Length(min=4, max=50, message="Workspace names must be at least 4 and not more than 50 characters")])
name = StringField(
"Workspace Name",
validators=[
Length(
min=4,
max=50,
message="Workspace names must be at least 4 and not more than 50 characters",
)
],
)