Skip to content

Feature/custom controller#2

Open
wenyuzheng wants to merge 9 commits intofguitton:mainfrom
dsi-icl:feature/custom-controller
Open

Feature/custom controller#2
wenyuzheng wants to merge 9 commits intofguitton:mainfrom
dsi-icl:feature/custom-controller

Conversation

@wenyuzheng
Copy link
Copy Markdown

What has changed

  1. Add visible-to-admin-only controller html editor on project page, so only admins can see and upsert the html.
  2. Add two admin-only controller html editor server functions: $getCustomControllerHtml and $upsertCustomControllerHtml. In the functions, getProject() is used to check if the project exists, this is to prevent a malicious projectId like ../../../ to escape the directory and access other directories.
  3. Add three apis:
  • POST /api/portal/v1/bind to bound the slide to the wall.
  • GET /api/portal/v1/slides to get slides list of the current project and commit.
  • GET /api/portal/v1/controllers/$projectId to serve the html file.
  1. Add CONTROLLER_DIR to env and serverVariables so management centralised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants