Project

General

Profile

Actions

Feature #5648

closed

mon should use 'module'/'perm' string in MonCommands.h for caps checking

Added by Dan Mick almost 11 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Category:
Monitor
Target version:
-
% 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

Also available in: Atom PDF