Skip to content
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

Hide the invite member button for users that don't have access to a team or insufficient privileges #4303

Merged

Conversation

cstns
Copy link
Contributor

@cstns cstns commented Aug 1, 2024

Description

Hides the Invite member button for users that don't have sufficient privileges or insufficient privileges

Related Issue(s)

#4284

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production

Labels

  • Includes a DB migration? -> add the area:migration label

Copy link

codecov bot commented Aug 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.19%. Comparing base (f18548a) to head (335b961).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4303   +/-   ##
=======================================
  Coverage   78.19%   78.19%           
=======================================
  Files         292      292           
  Lines       13440    13440           
  Branches     3007     3007           
=======================================
  Hits        10510    10510           
  Misses       2930     2930           
Flag Coverage Δ
backend 78.19% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cstns cstns requested a review from Steve-Mcl August 1, 2024 15:52
@cstns cstns self-assigned this Aug 1, 2024
Copy link
Contributor

@Steve-Mcl Steve-Mcl left a comment

Choose a reason for hiding this comment

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

verified on pre-staging (logged in as owner, member and viewer & verified correct visibility)

@Steve-Mcl
Copy link
Contributor

merge when tests go green.

@Steve-Mcl Steve-Mcl linked an issue Aug 2, 2024 that may be closed by this pull request
cstns added 4 commits August 2, 2024 12:29
…t in opening or showing an empty menu)

- display the right user navigation button when no team present while hiding teams selector when no teams are available
- hide invite members button on mobile devices to preserve nav width integrity
- display the right notifications button on mobile
- ui tweaks to the NoTeamUSer component that is being shown when a user does not have a team
- hide the team selector 'create team' button if the platform settings do not allow users to create teams
…users-without-teams' into 4284_hide-invite-member-button-for-users-without-permissions

# Conflicts:
#	frontend/src/components/PageHeader.vue
…or-users-without-permissions' into 4284_hide-invite-member-button-for-users-without-permissions
cstns added 2 commits August 2, 2024 12:48
This reverts commit 17e9cd0.
…(no point in opening or showing an empty menu)"

This reverts commit 7348de3.
@cstns
Copy link
Contributor Author

cstns commented Aug 2, 2024

the ui failing test is the devices/bulk.spec.js. Will merge if ok with you, @Steve-Mcl!

@Steve-Mcl
Copy link
Contributor

the ui failing test is the devices/bulk.spec.js. Will merge if ok with you, @Steve-Mcl!

Yes please, then re-run these ui tests.

@cstns cstns merged commit c547148 into main Aug 2, 2024
14 checks passed
@cstns cstns deleted the 4284_hide-invite-member-button-for-users-without-permissions branch August 2, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invite Members button visible for all user types
2 participants