Actions
Feature #5648
closedmon should use 'module'/'perm' string in MonCommands.h for caps checking
% Done:
0%
Source:
other
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:
Description
'perm' was added to MonCommands.h for controlling GET vs PUT endpoints in ceph-rest-api;
however, it's also aimed at removing the fixed comparisons for monitor command permissions.
Replace things like session->is_capable("mds", MON_CAP_R) with something like "session->is_capable(cmdmap)"
which will look up cmdmap['prefix'] and find the module/required perms and compare the session caps
with it instead of the fixed MON_CAP_R.
Actions