Skip to content

Commit

Permalink
Merge branch 'feature/793-fix' of https://github.com/OpenSourceBrain/…
Browse files Browse the repository at this point in the history
…OSBv2 into develop
  • Loading branch information
filippomc committed Jan 23, 2024
2 parents 59be5f7 + fdfc5e8 commit 9849c3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 2 additions & 4 deletions applications/workspaces/server/workspaces/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ def setup_static_router(app):
# remove the static route (if exists)
app.url_map._rules_by_endpoint["static"] = []
# add / as static route
app.add_url_rule(f"/<path:filename>", endpoint="static", view_func=app.send_static_file)

app.add_url_rule(f"/<path:filename>", view_func=app.send_static_file)

def init_app(app):
cors = CORS(app, resources={r"/api/*": {"origins": "*"}})
Expand All @@ -56,7 +55,7 @@ def init_app(app):
"Could not start kafka consumers. Some application functionality won't be available.", exc_info=True
)
mkdirs()
# setup_static_router(app)
setup_static_router(app)
app.template_folder = Config.TEMPLATE_DIR


Expand All @@ -70,7 +69,6 @@ def init_app(app):




if __name__ == "__main__":
cloudharness.set_debug()
main()
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,6 @@ def clone(self, workspace_id):

def is_authorized(self, workspace):
current_user_id = keycloak_user_id()
if not current_user_id:
return False
return workspace and (workspace.publicable or
(workspace.user_id and workspace.user_id == current_user_id) or
(get_auth_client().user_has_realm_role(user_id=current_user_id, role="administrator")))
Expand Down

0 comments on commit 9849c3e

Please sign in to comment.