Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Project Gallery: only restrict advanced project types if sharing is disabled - #26173

#26173
Merged
Erin007 merged 4 commits into
stagingcode-dot-org/code-dot-org:stagingfrom
sharing-restrictions-only-app-and-gamecode-dot-org/code-dot-org:sharing-restrictions-only-app-and-gameCopy head branch name to clipboard
Nov 20, 2018
Merged

Project Gallery: only restrict advanced project types if sharing is disabled #26173
Erin007 merged 4 commits into
stagingcode-dot-org/code-dot-org:stagingfrom
sharing-restrictions-only-app-and-gamecode-dot-org/code-dot-org:sharing-restrictions-only-app-and-gameCopy head branch name to clipboard

Conversation

@Erin007

@Erin007 Erin007 commented Nov 20, 2018

Copy link
Copy Markdown
Contributor

Dance Party Issue 402

When fetching project information for the public project gallery, there is currently a check that says if the owner of the project has sharing disabled, don't include that project in the list to show in the gallery. Right now the project is not included in the list of projects to show in the project gallery if the owner has sharing disabled regardless of project type. Sharing restrictions should only apply to advanced project types. This bug fix excludes only App Lab, Game Lab and Sprite Lab projects from being shown in the public gallery if sharing is disabled; even if sharing is disabled all other project types, including dance, will show in the gallery. This change will fix the issue reported that not all published Dance Party projects show in the gallery (a symptom of the broader problem described).

@davidsbailey davidsbailey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code change looks good! Please add a simple test. See sharing_disabled in projects_list_test.rb for some existing examples which test this part of the code. OK to do it in a later PR if you need.

@davidsbailey davidsbailey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

new tests look good! 👍

Comment thread dashboard/lib/projects_list.rb Outdated
# Sharing of advanced project types to the public gallery is restricted for
# young students unless sharing is explciitly enabled by the student's
# teacher for privacy reasons.
ADVANCED_PROJECT_TYPES = ['applab', 'gamelab']

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What about Sprite Lab? I don't think it lets you upload/create any images, but it allows arbitrary text and we don't have any PII filtering in place yet. Maybe we should keep it locked down for now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good idea. I didn't think about Sprite Lab. I'll add and we can revisit later if needed.

@Erin007
Erin007 force-pushed the sharing-restrictions-only-app-and-game branch from 97b8d05 to 9c1ad52 Compare November 20, 2018 06:04

@islemaster islemaster left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice tests!

@Erin007 Erin007 changed the title Project Gallery: only restrict App Lab and Game Lab if sharing is disabled Project Gallery: only restrict advanced project types if sharing is disabled Nov 20, 2018
@Erin007

Erin007 commented Nov 20, 2018

Copy link
Copy Markdown
Contributor Author

@uponthesun if you're still curious, this ended up being the fix for only a limited number of Dance Party projects showing in the gallery. Thanks for taking a look at my notes, and feel free to reach out with any follow-up questions.

@Erin007
Erin007 merged commit 0c5905f into staging Nov 20, 2018
@Erin007
Erin007 deleted the sharing-restrictions-only-app-and-game branch November 20, 2018 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.