# Path: cydra/component.py
# class Interface(object):
#     """Marker base class for extension point interfaces.
# 
#     Behavior of the ExtensionPoints for an interface can be customized with
#     _iface_XY class attributes. These behaviors are specified in the interface
#     in order to establish common ground rules in accessing the components for
#     an interface."""
# 
#     _iface_single_extension = False
#     """Only allow one active component for this interface"""
# 
#     _iface_attribute_proxy = None
#     """Callable to use for attribute access
# 
#     The callable will receive the paramenters interface, components and name (in this order)"""
# 
#     _iface_disable_extension_cache = False
#     """Disable the cache for the active extensions"""
# 
# class FallbackAttributeProxy(object):
#     """Proxy for use in interfaces
# 
#     Tries one extension after the other until something not None is returned"""
# 
#     def __init__(self):
#         pass
# 
#     def __call__(self, interface, components, name):
#         def call_all_components(*args, **kwargs):
#             for o in components:
#                 ret = getattr(o, name)(*args, **kwargs)
#                 if ret is not None:
#                     return ret
# 
#         if callable(getattr(interface, name)):
#             return call_all_components
#         else:
#             for o in components:
#                 ret = getattr(o, name)
#                 if ret is not None:
#                     return ret
#             return None


from functools import partial
from cydra.component import Interface, FallbackAttributeProxy
        """Test if the user has this permission

        :param project: project instance. If None is supplied, global permissions are checked
        :param user: userid. user of '*' means any user/guest access
        :param obj: object (dotted, hierarchical string)
        :param permission: permission (eg: read, write, view, edit, ...)

        :return: True if the user has this permission, False if not and None if undefined in this provider"""
        pass

    def get_group_permission(self, project, group, obj, permission):
        """Test if the group has this permission

        :param project: project instance. If None is supplied, global permissions are checked
        :param group: Group object
        :param obj: object (dotted, hierarchical string)
        :param permission: permission (eg: read, write, view, edit, ...)

        :return: True if the user has this permission, False if not and None if undefined in this provider"""
        pass

    def set_permission(self, project, user, obj, permission, value=None):
        """Set or unset the permission

        :param project: project instance. If None is supplied, global permissions are set
        :param user: userid. user of '*' means any user/guest access
        :param obj: object (dotted, hierarchical string)
        :param permission: permission (eg: read, write, view, edit, ...)

        :return: True if successfully set, None if this provider is not authoritative for this tuple"""

# Path: cydra/component.py
# class Interface(object):
#     """Marker base class for extension point interfaces.
# 
#     Behavior of the ExtensionPoints for an interface can be customized with
#     _iface_XY class attributes. These behaviors are specified in the interface
#     in order to establish common ground rules in accessing the components for
#     an interface."""
# 
#     _iface_single_extension = False
#     """Only allow one active component for this interface"""
# 
#     _iface_attribute_proxy = None
#     """Callable to use for attribute access
# 
#     The callable will receive the paramenters interface, components and name (in this order)"""
# 
#     _iface_disable_extension_cache = False
#     """Disable the cache for the active extensions"""
# 
# class FallbackAttributeProxy(object):
#     """Proxy for use in interfaces
# 
#     Tries one extension after the other until something not None is returned"""
# 
#     def __init__(self):
#         pass
# 
#     def __call__(self, interface, components, name):
#         def call_all_components(*args, **kwargs):
#             for o in components:
#                 ret = getattr(o, name)(*args, **kwargs)
#                 if ret is not None:
#                     return ret
# 
#         if callable(getattr(interface, name)):
#             return call_all_components
#         else:
#             for o in components:
#                 ret = getattr(o, name)
#                 if ret is not None:
#                     return ret
#             return None


# Path: cydra/permission/interfaces.py
from functools import partial
from cydra.component import Interface, FallbackAttributeProxy

        """Test if the user has this permission

        :param project: project instance. If None is supplied, global permissions are checked
        :param user: userid. user of '*' means any user/guest access
        :param obj: object (dotted, hierarchical string)
        :param permission: permission (eg: read, write, view, edit, ...)

        :return: True if the user has this permission, False if not and None if undefined in this provider"""
        pass

    def get_group_permission(self, project, group, obj, permission):
        """Test if the group has this permission

        :param project: project instance. If None is supplied, global permissions are checked
        :param group: Group object
        :param obj: object (dotted, hierarchical string)
        :param permission: permission (eg: read, write, view, edit, ...)

        :return: True if the user has this permission, False if not and None if undefined in this provider"""
        pass

    def set_permission(self, project, user, obj, permission, value=None):
        """Set or unset the permission

        :param project: project instance. If None is supplied, global permissions are set
        :param user: userid. user of '*' means any user/guest access
        :param obj: object (dotted, hierarchical string)
        :param permission: permission (eg: read, write, view, edit, ...)

        :return: True if successfully set, None if this provider is not authoritative for this tuple"""

        pass