Commit 7d2e0f5a authored by Antoine Millet's avatar Antoine Millet
Browse files

[bug#3929] Added method globbing in right checking.

parent 0bfa6ddd
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ from __future__ import absolute_import
import logging
import socket
from copy import copy
from fnmatch import fnmatch as glob

from sjrpc.server import SimpleSslRpcServer

@@ -203,9 +204,9 @@ class CCServer(object):
        rights = self.conf.show(client.login)['rights']
        objects = self.list(tql, pure=True)
        for right in rights:
            if not (right['method'] is None or right['method'] == method):
            if not (right['method'] is None or glob(method, right['method'])):
                continue
            if right['tql'] is not None:
            if right['tql']:
                objects_right = self.list(right['tql'], pure=True)
                if not objects <= objects_right:
                    continue