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

Don't show user management in app switcher if user has not role 'admin' #7197

Merged
merged 9 commits into from
Jun 30, 2022

Conversation

AlexAndBear
Copy link
Contributor

@AlexAndBear AlexAndBear commented Jun 29, 2022

Description

Related Issue

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • ...

@update-docs
Copy link

update-docs bot commented Jun 29, 2022

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@AlexAndBear AlexAndBear marked this pull request as ready for review June 29, 2022 11:17
@AlexAndBear AlexAndBear requested a review from kulmann June 29, 2022 12:11
packages/web-pkg/src/services/permissionManager.ts Outdated Show resolved Hide resolved
packages/web-app-user-management/src/index.js Outdated Show resolved Hide resolved
store: Store<any>
}): void => {
const permissionManager = new PermissionManager(store)
vue.prototype.$permissionManager = permissionManager
Copy link
Member

Choose a reason for hiding this comment

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

You don't need to do both. Either set it on prototype or use reactive set. They both have the same result, so one is sufficient.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried that.
If I only use set(vue, '$permissionManager', permissionManager), the permissionManager is accessible in /home/jan/working/web/packages/web-app-user-management/src/index.js but not in
/home/jan/working/web/packages/web-app-files/src/views/spaces/Projects.vue

and vice versa, I have no clue why this is the case :x

packages/web-runtime/src/store/user.js Outdated Show resolved Hide resolved
Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

❤️

@sonarcloud
Copy link

sonarcloud bot commented Jun 30, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

51.6% 51.6% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants