Application Privileges Changes

Hi,

I have a few scripts that require sets of privileges I don’t want certain users to have.

What I’ve done is create groups w/ these application privileges set, but what I’m running into is some of the scripts see, tp require the user to have some of these privileges & do not function.

I’m wondering if there’s a way to add script to change change the privileges of the user, or maybe invoke the privileges of another user/group to run those scripts?

Another way I thought would be to change the users groups in the script, but I have visual elements tied to groups, so I wouldn’t want things appearing & disappearing on the screen.

Also, since I’m on the topic, which privilege allows user to change a text label (scripted changes)?

Hi Danny,

It sounds like you’re trying to temporarily elevate users for example from a Standard Viewer to a Developer/Power User and then back down. You can absolutely do this in the admin screen or API but these changes do not take place until the session is refreshed. I don’t think this is going to be practical as you’d have to log in/out the user to elevate permissions and then do it again to lower the permissions.

What sort of action are you trying to do that would require this? It seems to me that you might as well use a Power User in the first place since you’d be having the user use the features of this license anyway, save you a lot of trouble…

Hi, no. Basically I have javascript that doesn’t seem to be working, because it’s performing functions that are locked down using Application Privileges, based on the users session.

As an example, I have a script in the Loading group that is updating a label text, based on the users name to give it a bit of a friendly feel. Here’s the script:

label2.labelText = this.baseViewService.currentView.control.name;

var name = dundas.context.currentSession.accountDisplayName;

label2.labelText = "Hello, " + name + ". | " + "Sign Out?";

When I use a Standard Account of a user who has most privileges locked down, when they sign it won’t change, but when I log in as that same Standard user removed from that privilege restricting group, it works just fine. So, I’m trying to figure out how I can get this to work, but then I had a side question of which privilege was the one actually blocking me. Thanks!

Hi Danny,

You’re going to run into the same problem that I mentioned earlier, yes you can change the privileges dynamically with the API but it’s not practical on the dashboard as you’d have to do the following

  1. Log in as an admin through script to make a change
  2. Change the user privs
  3. Have the user log in again
  4. Run Script
  5. Remove privs
  6. Have the user log in again.
  7. Log out Admin

Curious - which privilege is blocking this sort of script from running? Looking at the list and it’s not jumping out at me what would cause this as it’s a simple script after all.

100% agree with Jeff here (not that he needs my support)

Have you checked in the developer console in Chrome to see if there are any error messages?