Good afternoon, community. I am currently trying to add a role to a current user in plone programmatically via python schema in dexterity. There were practically no errors shown in the console, but when i went to check to see if any changes occured, nothing changed.
This is the python code I was using:
def setManagers(self): user = api.user.get_current() userid = user.getProperty('username') api.user.grant_roles( username=userid, roles=['Manager', 'Reader'], )
The current role is set to 'Owner' however i would like to have it set to manager and reader as well. What do I need to change? I thank you for your help in advance!