Jump to content

"Force" addRole to user via API


Torsten Baldes
 Share

Recommended Posts

Hi,

I'm using IftRunner (https://github.com/ryancramerdesign/IftRunner) to update/change the roles of a user based on a selection in the user profile.

Example:

The field "location" has multiple cities (city1,city2,city3) and when the user changes this field from "city1" to "city2", he should get the role "admin_city2", which can access and edit users with the role "usergroup_city2".

Unfortunately the api call "addRole" seems to check, if the current user has the permissions to assign this role.  Since he has only the role "admin_city1", he can't change his role to "admin_city2". 

Is there a way to "force" the api to do this, even when the current user doesn't have the permissions?

 

Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...