-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FOGL-8760 permissions optional support added in configuration Manager along with restrictions on configuration update API #1411
Conversation
Signed-off-by: ashish-jabble <ashish@dianomic.com>
…KV pair Signed-off-by: ashish-jabble <ashish@dianomic.com>
Signed-off-by: ashish-jabble <ashish@dianomic.com>
… type Signed-off-by: ashish-jabble <ashish@dianomic.com>
Signed-off-by: ashish-jabble <ashish@dianomic.com>
Signed-off-by: ashish-jabble <ashish@dianomic.com>
…ged in user type is not given in the list of permission; also updated unit tests Signed-off-by: ashish-jabble <ashish@dianomic.com>
if not request.user_is_admin: | ||
if 'permission' in cat_info[item_name]: | ||
if not (user_role_name in cat_info[item_name]['permission']): | ||
raise Exception('Forbidden') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to add a know exception custom class, AccessDenied or PermissionDenied and handle that instead of string match
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah it was planned but this exception actually to be defined in user model but Not in configuration manager; due to avoid of circular dependency issue, I have kept it under general exception having message Forbidden to get the actual HTTP status code.
Signed-off-by: ashish-jabble <ashish@dianomic.com>
Signed-off-by: ashish-jabble <ashish@dianomic.com>
No description provided.