Skip to content

Conversation

@Bubballoo3
Copy link
Contributor

@Bubballoo3 Bubballoo3 commented Oct 30, 2025

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.

Comment on lines 155 to 157
def owned_by_user?
File.stat(project_dataroot).uid == CurrentUser.uid
end
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

@Bubballoo3 Bubballoo3 changed the title exclude own projects from import list exclude owned/imported projects from import list Nov 3, 2025
@Bubballoo3
Copy link
Contributor Author

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.

Copy link
Contributor

@johrstrom johrstrom left a comment

Choose a reason for hiding this comment

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

LGTM.

@Bubballoo3 Bubballoo3 merged commit d2a23d0 into master Nov 3, 2025
25 checks passed
@github-project-automation github-project-automation bot moved this from Awaiting Review to Merged/Closed in PR Review Pipeline Nov 3, 2025
@Bubballoo3 Bubballoo3 deleted the remove-own-project-imports-4120 branch November 3, 2025 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Merged/Closed

Development

Successfully merging this pull request may close these issues.

4 participants