Read-only users could see the Settings icon but were denied access
to user management pages. Remove user read permission from the
read-only role so the administration menu stays hidden.
Fixes: https://tracker.ceph.com/issues/77952
Signed-off-by: Abhishek Desai <adesai@redhat.com>
# read-only role provides read-only permission for all scopes
READ_ONLY_ROLE = Role(
'read-only',
- 'allows read permission for all security scope except dashboard settings and config-opt', {
+ 'allows read permission for all security scope except user, dashboard settings and config-opt', {
scope_name: [_P.READ] for scope_name in Scope.all_scopes()
- if scope_name not in (Scope.DASHBOARD_SETTINGS, Scope.CONFIG_OPT)
+ if scope_name not in (Scope.USER, Scope.DASHBOARD_SETTINGS, Scope.CONFIG_OPT)
})
self.assertEqual(role['name'], 'read-only')
self.assertEqual(
role['description'],
- 'allows read permission for all security scope except dashboard settings and config-opt'
+ 'allows read permission for all security scope except user, dashboard settings and config-opt'
)
def test_delete_system_role(self):