]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Monitor.h: add 'requires_perm()' function to MonCommand struct
authorJoao Eduardo Luis <joao@redhat.com>
Fri, 19 Sep 2014 17:03:19 +0000 (18:03 +0100)
committerJoao Eduardo Luis <joao@redhat.com>
Mon, 22 Sep 2014 16:36:29 +0000 (17:36 +0100)
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
src/mon/Monitor.h

index b5b04db5d14d0611dee254bfe66fe88a67e5b615..a1029384c3906f93bb66a4ba78fcb47a7d85068b 100644 (file)
@@ -1012,6 +1012,10 @@ struct MonCommand {
     ::decode_array_nohead(*cmds, *size, bl);
     DECODE_FINISH(bl);
   }
+
+  bool requires_perm(char p) const {
+    return (req_perms.find(p) != string::npos); 
+  }
 };
 WRITE_CLASS_ENCODER(MonCommand)