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
Switch to project user system #1114
Conversation
I think maybe we just kill organizations on a user's page and instead do something with projects. |
Wouldn't unused code be caught by coveralls @begedin? |
The project card appears to still be using organization members, as does I think the sidebar. Not sure where else. Is this an oversight, or intended to be done as a separate issue? I'm having a bit of trouble knowing how to review since there seems to potentially be a decent number of such instances. Here are unique file results for
And
And
This excludes some irrelevant stuff but does not attempt to deduplicate and is likely not exhaustive. There are also likely some irrelevant things in here. But it does appear that we have more than just some cleanup to do, as at least a few components will change in some fundamental way and several parts of the UI appear to be impacted. |
A good part of that is simply removal of all references to organization memberships, which I did not do. I also definitely missed a few, mostly doe to not having tests. I'm not sure what the best approach to handle it is. I would say we try to switch the remainder here, then deal with cleanup in another PR. |
8fa2639
to
251dcb1
Compare
This is good for another review, and hopefully, for a merge. I think I did as much as I could with it. It's gonna be a pain to review, but changing one think kept breaking another until I cleaned it all up. I managed to reorder and organize the commits, at least, so I guess reviewing individual commits might make it easier. |
The drop in coverage is unavoidable. None of the remaining files have a coverage drop, but we did remove a couple of well-tested files in this PR, which drops the overall average. |
Get rid of obsolete code Get rid of organization memberships completely Get rid of credentials service
3dadbce
to
996ea56
Compare
What's in this PR?
List the changes you made and your reasons for them.
This PR does a major switch from
organizationMembers
toprojectUsers
. I tried doing it more granularly, but it ended up being too much of a pain.The switch here is mostly complete. The couple of minor things that need doing are:
Decide what to do with the remainingMoved it into the component. It's not the best approach, but there's no point in having just that one function that's used in just that one spot in a separate service. Initially, I wanted to move it to a route action, but with the way ourjoinProject
function in thecredentials
service. The one place it's used in could define it directly, or it could trigger a route action and we can define the action on the route.project
,project.index
,project.settings
andproject.donate
templates are written, the component is used in several spots on several different routes, so we would have to write the action several times. I think we need to reconsider how our templates/routes are organized in these cases. Created issue Discussion: Reconsider the route/template structure for donate and thank-you #1122 to further deal with it.Decide what to do with the user profile page. Right now, it renders user's organizations through thecreated Discussion: Should we maintain and render a list of user organizations? #1121 to discussorganizationMemberships
relation. I recommend instead adding ahasMany('organizations')
to users as an inverse oforganization.owner
and rendering that. We can do this in a separate issue.project.owner
) as well as those they contribute to (viauser.ProjectUsers
). - Actually added this by just renaming things. Seems to be working fine.organizationMemberships
in the mirage scenarios, etc. - I just outright removed all that I could find.