Torsten Baldes Posted March 12, 2018 Share Posted March 12, 2018 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 More sharing options...
Sergio Posted March 12, 2018 Share Posted March 12, 2018 Why not add the new role to the user and then remove his/her other role? Link to comment Share on other sites More sharing options...
Torsten Baldes Posted March 13, 2018 Author Share Posted March 13, 2018 19 hours ago, Sergio said: Why not add the new role to the user and then remove his/her other role? thanks for your suggestion. unfortunately "admin_city1" has also no access to users with "admin_city2". so it doesn't matter if I change the order. Link to comment Share on other sites More sharing options...
Sergio Posted March 13, 2018 Share Posted March 13, 2018 Hum, I think you have a similar problem I related here: Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now