-
Notifications
You must be signed in to change notification settings - Fork 1k
Manage organization "Teams" #11665
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
Manage organization "Teams" #11665
Conversation
10b6bc5
to
81e638c
Compare
A separate PR is probably best. |
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.
A few minor things caught in review and some comments on TODO.
Overall this functions as expected. I believe user-testing will expose some specific user experience concerns, but I can't predict them at this time.
Created separate PR #11779 to update project role journal entries and events. |
33cb034
to
0a08955
Compare
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.
The only outstanding change that needs to be addressed before this is mergable is that we should not change the current "Owner" and "Maintainer" role names for non-org projects.
Not only due to confusion in the UI, but also due to existing documentation, our own FAQ/help page, and 3rd party docs that reference these names.
warehouse/manage/forms.py
Outdated
@@ -36,7 +40,17 @@ class RoleNameMixin: | |||
|
|||
role_name = wtforms.SelectField( | |||
"Select role", | |||
choices=[("", "Select role"), ("Maintainer", "Maintainer"), ("Owner", "Owner")], | |||
choices=[("", "Select role"), ("Maintainer", "Upload"), ("Owner", "Admin")], |
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.
We should leave the labels for existing non-org projects as Maintainer
and Owner
until further notice, as merging this would change these labels and cause confusion for users.
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.
Fixed with commit 26bbc2e.
@divbzero note that this branch was rebased off of main to resolve translations merge conflicts that weren't auto-resolvable by GitHub |
Organization and project names correspond to public URLs and require stricter naming constraints. In contrast, team names are used internally within organizations so we can relax the constraint to allow non-ASCII international names.
SVG of `fa-sitemap` from Font Awesome 5.13.0: https://github.com/FortAwesome/Font-Awesome/blob/4e6402443679e0a9d12c7401ac8783ef4646657f/js-packages/%40fortawesome/free-solid-svg-icons/faSitemap.js Resized, recolored light gray, and converted to PNG.
- `fa-sitemap` for organizations - `fa-users` for teams - `fa-user` for collaborators/members/people
Similar to fixes in pypi#11378.
This reverts commit 2264221. The change will be included in separate pull request pypi#11779.
- {Admin => Owner} - {Upload => Maintainer} As @ewdurbin described in pypi#11665 we want to keep the original project roles "Owner" and "Maintainer" for individual users in projects, and use the new permissions "Administer" and "Upload" for teams in projects.
b98b784
to
faa9acc
Compare
@ewdurbin I’ve reverted the roles for individual users back to |
faa9acc
to
7211a16
Compare
- Add team projects to list of user projects - Add team projects with Administer permissions to projects owned
- Add links to organization for projects in organizations - Add links to organization for teams in organizations - Add display name to organization snippets - Add member count to team snippets These tweaks should make navigation easier and more intuitive.
7211a16
to
3bce85c
Compare
Fixed a few things that would have come up during user testing:
Things should be cleaner now so users can focus on other usability issues. @ewdurbin I think this pull request should be all set for merging. Please let me know if you spot anything else. |
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.
This is working as expected and is ready for user testing.
* Create initial models for Teams * Add services for Teams to do all the things * Add tests for the Teams services * Add "Teams" to manage organization menu * Template for manage organization "Teams" * Grant "manage:team" permissions to org Owner * Relax Team name constraint and add normalized_name Organization and project names correspond to public URLs and require stricter naming constraints. In contrast, team names are used internally within organizations so we can relax the constraint to allow non-ASCII international names. * `find_teamid` by organization ID and team name * View and form for manage organization "Teams" * .team-snippet style * sitemap.{png,svg} SVG of `fa-sitemap` from Font Awesome 5.13.0: https://github.com/FortAwesome/Font-Awesome/blob/4e6402443679e0a9d12c7401ac8783ef4646657f/js-packages/%40fortawesome/free-solid-svg-icons/faSitemap.js Resized, recolored light gray, and converted to PNG. * Tests for manage organization "Teams" * Emails for manage organization "Teams" * Base template for manage team pages * Switch icons for organizations and teams - `fa-sitemap` for organizations - `fa-users` for teams - `fa-user` for collaborators/members/people * Template for manage team "Projects" * View for manage team "Projects" * Tests for manage team "Projects" * `TeamRoleType` and `TeamProjectRoleType` enums * Template for manage team "Members" * View and form for manage team "Members" * Tests for manage team "Members" * Template for manage team "Settings" * View and form for manage team "Settings" * Tests for manage team "Settings" * Fix typo in "added-as-organization-member" email * Fix typo in "organization-member-removed" email * Emails for manage team "Members" * Emails for manage team "Settings" * Update Alembic revisions after merge branch 'main' * Update template for internal project collaborators * Views and forms for internal project collaborators * Update project role journal entries and events - Standardize journal entry action to be "add {role_name} {username}" - Standardize project event tag to be "project:role:create" - Standardize user event tag to be "account:role:create" * Tests for internal project collaborators * Emails for internal project collaborators * List org owners as internal project collaborators * Restore 2FA column for project collaborators * Fix redirect after removing team member * Fix redirect after renaming team * Enable events for `Team` * Record events for `Team` * Rename {Team.users => Team.members} * Fix tests after merge branch 'main' * Fix SQLAlchemy warnings for `Team` Similar to fixes in pypi#11378. * Revert "Update project role journal entries and events" This reverts commit 2264221. The change will be included in separate pull request pypi#11779. * Update Alembic revisions after rebase 'main' * Revert renaming of roles for individual users - {Admin => Owner} - {Upload => Maintainer} As @ewdurbin described in pypi#11665 we want to keep the original project roles "Owner" and "Maintainer" for individual users in projects, and use the new permissions "Administer" and "Upload" for teams in projects. * Rename permissions for teams {Admin => Administer} * Clarify in emails that teams have "permissions" * Clarify in templates that teams have "permissions" * Include team projects in user's list of projects - Add team projects to list of user projects - Add team projects with Administer permissions to projects owned * Fix left align in "People" and "Members" tables * Tweak navigation for organizations and teams - Add links to organization for projects in organizations - Add links to organization for teams in organizations - Add display name to organization snippets - Add member count to team snippets These tweaks should make navigation easier and more intuitive. * Grant project permissions to team members * re-order migrations Co-authored-by: sterbo <[email protected]> Co-authored-by: Ee Durbin <[email protected]>
* Create initial models for Teams * Add services for Teams to do all the things * Add tests for the Teams services * Add "Teams" to manage organization menu * Template for manage organization "Teams" * Grant "manage:team" permissions to org Owner * Relax Team name constraint and add normalized_name Organization and project names correspond to public URLs and require stricter naming constraints. In contrast, team names are used internally within organizations so we can relax the constraint to allow non-ASCII international names. * `find_teamid` by organization ID and team name * View and form for manage organization "Teams" * .team-snippet style * sitemap.{png,svg} SVG of `fa-sitemap` from Font Awesome 5.13.0: https://github.com/FortAwesome/Font-Awesome/blob/4e6402443679e0a9d12c7401ac8783ef4646657f/js-packages/%40fortawesome/free-solid-svg-icons/faSitemap.js Resized, recolored light gray, and converted to PNG. * Tests for manage organization "Teams" * Emails for manage organization "Teams" * Base template for manage team pages * Switch icons for organizations and teams - `fa-sitemap` for organizations - `fa-users` for teams - `fa-user` for collaborators/members/people * Template for manage team "Projects" * View for manage team "Projects" * Tests for manage team "Projects" * `TeamRoleType` and `TeamProjectRoleType` enums * Template for manage team "Members" * View and form for manage team "Members" * Tests for manage team "Members" * Template for manage team "Settings" * View and form for manage team "Settings" * Tests for manage team "Settings" * Fix typo in "added-as-organization-member" email * Fix typo in "organization-member-removed" email * Emails for manage team "Members" * Emails for manage team "Settings" * Update Alembic revisions after merge branch 'main' * Update template for internal project collaborators * Views and forms for internal project collaborators * Update project role journal entries and events - Standardize journal entry action to be "add {role_name} {username}" - Standardize project event tag to be "project:role:create" - Standardize user event tag to be "account:role:create" * Tests for internal project collaborators * Emails for internal project collaborators * List org owners as internal project collaborators * Restore 2FA column for project collaborators * Fix redirect after removing team member * Fix redirect after renaming team * Enable events for `Team` * Record events for `Team` * Rename {Team.users => Team.members} * Fix tests after merge branch 'main' * Fix SQLAlchemy warnings for `Team` Similar to fixes in pypi#11378. * Revert "Update project role journal entries and events" This reverts commit 2264221. The change will be included in separate pull request pypi#11779. * Update Alembic revisions after rebase 'main' * Revert renaming of roles for individual users - {Admin => Owner} - {Upload => Maintainer} As @ewdurbin described in pypi#11665 we want to keep the original project roles "Owner" and "Maintainer" for individual users in projects, and use the new permissions "Administer" and "Upload" for teams in projects. * Rename permissions for teams {Admin => Administer} * Clarify in emails that teams have "permissions" * Clarify in templates that teams have "permissions" * Include team projects in user's list of projects - Add team projects to list of user projects - Add team projects with Administer permissions to projects owned * Fix left align in "People" and "Members" tables * Tweak navigation for organizations and teams - Add links to organization for projects in organizations - Add links to organization for teams in organizations - Add display name to organization snippets - Add member count to team snippets These tweaks should make navigation easier and more intuitive. * Grant project permissions to team members * re-order migrations Co-authored-by: sterbo <[email protected]> Co-authored-by: Ee Durbin <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.