Trying to make Kickstart App not appear when not being Admin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2016 12:43 AM
Hello all.
I'd like to know how to make sure that when I log in as a user without admin capabilities, they will not see the Kickstart App default menu in the main landing page. I've tried including this function in the Kickstart App definitions:
Within the runtime-app-definition.js but it gives out a NULL value. When said line was given in, for example, idm-app.js, it will give out a proper true/false depending on Admin Capabilities (so the menus User and Organization do not appear in the Identity Management header menu), so it works properly there.
Where can we put on the 'check if user has Admin Capabilities or not' for this endeavor? I suspect somewhere like landing-app.js, but I'm not sure. Help?
Thank you.
I'd like to know how to make sure that when I log in as a user without admin capabilities, they will not see the Kickstart App default menu in the main landing page. I've tried including this function in the Kickstart App definitions:
isVisible: function(){ return AuthenticationSharedService.hasAdminCapability();}
Within the runtime-app-definition.js but it gives out a NULL value. When said line was given in, for example, idm-app.js, it will give out a proper true/false depending on Admin Capabilities (so the menus User and Organization do not appear in the Identity Management header menu), so it works properly there.
Where can we put on the 'check if user has Admin Capabilities or not' for this endeavor? I suspect somewhere like landing-app.js, but I'm not sure. Help?
Thank you.
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2016 09:04 AM
This is from the top of my head … but doesn't the 'account' call returns the information on which capabilities the user has?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2016 06:52 AM
I changed the if-statement in runtime-app-definition-service.js from
<javascript>
if (app.defaultAppId === 'kickstart') {
…
}
</javascript>
to
<javascript>
if (app.defaultAppId === 'kickstart' && AuthenticationSharedService.hasAdminCapability()) {
…
}
</javascript>
Now I don't see the Kickstart button as a normal user (means <code>AuthenticationSharedService.hasAdminCapability()</code> is not null for me and contains the correct value).
But it is still possible to access the editor when you enter the URL directly (http://localhost:8080/activiti-app/editor/). I will take a closer look and I will post an update as soon as I found out more details about this.
<javascript>
if (app.defaultAppId === 'kickstart') {
…
}
</javascript>
to
<javascript>
if (app.defaultAppId === 'kickstart' && AuthenticationSharedService.hasAdminCapability()) {
…
}
</javascript>
Now I don't see the Kickstart button as a normal user (means <code>AuthenticationSharedService.hasAdminCapability()</code> is not null for me and contains the correct value).
But it is still possible to access the editor when you enter the URL directly (http://localhost:8080/activiti-app/editor/). I will take a closer look and I will post an update as soon as I found out more details about this.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2016 04:51 AM
you must use the hasAdminCapability() in the all begin of the all kickstart's views controller if 's return null value then use $scope.backToLanding() this method exist in all kickstart controllers
