# Path: m2core/utils/decorators.py
# class classproperty(property):
#     def __get__(self, obj, objtype=None):
#         return super(classproperty, self).__get__(objtype)
# 
#     def __set__(self, obj, value):
#         super(classproperty, self).__set__(type(obj), value)
# 
#     def __delete__(self, obj):
#         super(classproperty, self).__delete__(type(obj))


import re
from m2core.utils.decorators import classproperty
        cls.registry.add(cls)
        cls.registry -= set(bases)  # Remove base classes

    def __str__(cls):
        if cls in cls.registry:
            return cls.__name__
        return cls.__name__ + ": " + ", ".join([sc.__name__ for sc in cls])


class PermissionsEnum(metaclass=PermissionsEnumMeta):
    AUTHORIZED = Permission('authorized')

    @classproperty
    def ALL(cls):
        cache_var_name = '__all_cache'
        cached_perms = getattr(cls, cache_var_name, None)
        if cached_perms is None:
            setattr(cls, cache_var_name, set())
            cached_perms = getattr(cls, cache_var_name)
            for attr_name in dir(cls):
                if not attr_name.startswith('_') and attr_name != 'ALL':
                    attr = getattr(cls, attr_name)
                    if type(attr) is Permission:
                        cached_perms.add(attr)
        return cached_perms

    @classproperty
    def SKIP(cls):
        return lambda p: True


# Path: m2core/utils/decorators.py
# class classproperty(property):
#     def __get__(self, obj, objtype=None):
#         return super(classproperty, self).__get__(objtype)
# 
#     def __set__(self, obj, value):
#         super(classproperty, self).__set__(type(obj), value)
# 
#     def __delete__(self, obj):
#         super(classproperty, self).__delete__(type(obj))


# Path: m2core/common/permissions.py
import re
from m2core.utils.decorators import classproperty

        cls.registry.add(cls)
        cls.registry -= set(bases)  # Remove base classes

    def __str__(cls):
        if cls in cls.registry:
            return cls.__name__
        return cls.__name__ + ": " + ", ".join([sc.__name__ for sc in cls])


class PermissionsEnum(metaclass=PermissionsEnumMeta):
    AUTHORIZED = Permission('authorized')

    @classproperty
    def ALL(cls):
        cache_var_name = '__all_cache'
        cached_perms = getattr(cls, cache_var_name, None)
        if cached_perms is None:
            setattr(cls, cache_var_name, set())
            cached_perms = getattr(cls, cache_var_name)
            for attr_name in dir(cls):
                if not attr_name.startswith('_') and attr_name != 'ALL':
                    attr = getattr(cls, attr_name)
                    if type(attr) is Permission:
                        cached_perms.add(attr)
        return cached_perms

    @classproperty
    def SKIP(cls):
        return lambda p: True


    @classproperty