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

Client upgraded permissions sub super #147

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

JamieHooper-code
Copy link
Contributor

No description provided.

function NavConfig(Auth, NavProvider, Permission) {
//Need to import Auth and Permission here. Why doesn't this work? in install.nav.config.js and search.tab.js
//this is used in seemingly the exact same way.
var group = NavProvider.group('user', {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

why doesnt this work? the other times auth is used it appears to be the exact same.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's because install.nav.config.js uses .run() instead of .config() where line 21 is in this file.

function NavConfig(Auth, NavProvider, Permission) {
//Need to import Auth and Permission here. Why doesn't this work? in install.nav.config.js and search.tab.js
//this is used in seemingly the exact same way.
var group = NavProvider.group('user', {
Copy link
Contributor

Choose a reason for hiding this comment

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

It's because install.nav.config.js uses .run() instead of .config() where line 21 is in this file.

@@ -62,5 +63,9 @@
function assignClientModal() {
return ServerAssignModal.client([assign.server], assign.server.access.sub);
}

function hasSubSuperAccess() {
Copy link
Contributor

Choose a reason for hiding this comment

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

since this is a function, you would need to use assign.client.subSuperAccess() instead of assign.client.subSuperAccess to get the returned value from the function.

We'll need this implemented for real, what's the plan here? We would need to fetch this off of the authenticated user's account details. Since we'd be using this in multiple places, we may need to add another service to get & cache this information, or maybe we can cache it with the user details (like user name)?

text: "Super Clients",
sref: "app.user.client.super.list"
});
function UserSidebarShowWithPermissions(Auth, Select /*, Permission*/) {
Copy link
Contributor

Choose a reason for hiding this comment

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

permission can't be imported because this is the client side. Clients don't have permissions - only Admins & Integrations do. We need a way of getting this information off of the client account, e.g. GET /client/{authed ID}.

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.

2 participants