Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show project owner and other details when levelbuilders view projects #21308

Merged
merged 5 commits into from Mar 27, 2018

Conversation

davidsbailey
Copy link
Member

Description

show project owner username, storage owner id and storage app id when levelbuilders view projects.

Screenshot

screen shot 2018-03-17 at 11 07 51 am

Scenarios

times we have needed this lately:

  • Josh S receives a report that a project is abusive, and needs the project owner to assume identity
  • data loss is reported on a certain project, and we need the storage id / storage app id to find the project in S3
  • a project that should be frozen is not frozen, and we need to find the level builder who owns it so they can freeze it

other notes

  • this info only appears when params[:channel_id] is set, which is on the following routes:
    get "/#{key}/:channel_id", to: 'projects#show', key: key.to_s, as: "#{key}_project_share", share: true
    get "/#{key}/:channel_id/edit", to: 'projects#edit', key: key.to_s, as: "#{key}_project_edit"
    get "/#{key}/:channel_id/view", to: 'projects#show', key: key.to_s, as: "#{key}_project_view", readonly: true
    . notably, this info is not shown when viewing a script level that is project-backed (example). in this scenario, anyone can run dashboard.project.getShareUrl() from the Chrome Debugger prompt to get the project share link, and this info will be available when they go to that link.
  • it is important to never send this info down to the client for non-privileged users, because we don't want non-privileged users to be able to see who owns a project.

@@ -95,6 +100,7 @@

- if current_user.permission?(UserPermission::PROJECT_VALIDATOR)
%br

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed?

Copy link

@epeach epeach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question about permissions/security: Are we okay with all levelbuilders being able to see the storage ids?

@davidsbailey
Copy link
Member Author

I've changed this to only be visible to project validators. Per offline discussion:

  1. we do not currently have any plans to give project validator permissions to anyone outside code.org
  2. if we need to give project-related permissions to someone outside code.org in the future, we should rename the project_validator permission to project_admin, and then create a new permission for outside people to receive.

Copy link

@epeach epeach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@davidsbailey
Copy link
Member Author

Moved some things around and added a link to sources in S3:

screen shot 2018-03-26 at 4 53 50 pm

@davidsbailey davidsbailey merged commit 2135375 into staging Mar 27, 2018
@davidsbailey davidsbailey deleted the show-project-metadata branch March 27, 2018 04:48
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.

None yet

2 participants