-
Notifications
You must be signed in to change notification settings - Fork 158
exclude owned/imported projects from import list #4751
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
Conversation
apps/dashboard/app/models/project.rb
Outdated
| def owned_by_user? | ||
| File.stat(project_dataroot).uid == CurrentUser.uid | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we should reject by ownership. Seems like if anything we should reject projects that have already been imported - but I want to say we took care of that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything you currently own already pops up in your dashboard, and while importing your own project doesn't produce any errors, it doesn't end up changing anything at all. My thinking was that since we want to move the import form into the project dashboard anyway (since there is not enough content to justify a separate page), it would just be confusing to display projects twice on the same page. Why would you want to see your own projects here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Projects you own are just a subset of all the projects imported though. If you own it, you have already imported it right?
it would just be confusing to display projects twice on the same page
Yes I agree, my issue is on the criteria to reject a project, not whether to do it at all.
This reverts commit f377330.
|
The initial commit was reverted and an alternative criteria has been implemented for rejecting projects from the import list. I opted to reject after the cache call to avoid any issues from caching a filtered list that could go out of date. Successfully filters out both unowned projects after they are imported and does not include personally owned projects in the import list. |
johrstrom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Contributes to #4120. Adds a filter on the discovered projects so that only projects owned by other users are presented as options. These changes do not fix the issue of the card pane for discovered projects still being visible when empty, but this will be fixed in a future PR reformatting the import views.