I would like to automatically set the allowed modules a user has based on its role profile.
I added a hook:
doc_events = {
"User": {
"on_update": "test_app.api.set_allowed_modules_based_on_role_profile"
}
}
In the related method I can get the role profile, but I do not know how to modify the modules_html field which contains the allowed modules.
def set_allowed_modules_based_on_role_profile(self, method):
print(self.modules_html)
Says modules html does not exist.