only show edit workspace link to users who have permission, plus
formatting
This commit is contained in:
@@ -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
|
||||
|
@@ -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",
|
||||
)
|
||||
],
|
||||
)
|
||||
|
Reference in New Issue
Block a user