webpack/permissionsHelper.js in foreman_ansible-10.3.0 vs webpack/permissionsHelper.js in foreman_ansible-10.4.0
- old
+ new
@@ -9,10 +9,13 @@
throw new Error(
'No user data when loading the page - cannot determine if current user is allowed to view the page.'
);
}
- if (user.admin) {
+ if (
+ user.admin ||
+ user.usergroups.nodes.find(usergroup => usergroup.admin === true)
+ ) {
return { allowed: true };
}
const permList = permissionsRequired.reduce((memo, item) => {
const found = user.permissions.nodes.find(