Module Expr Str ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str If CompareIs NameLoad NameLoad body If AttributeLoad NameLoad attr body Return NameLoad If BoolOpAnd AttributeLoad NameLoad attr CompareEq NameLoad NameLoad body Return NameLoad If BoolOpAnd AttributeLoad NameLoad attr CompareEq NameLoad NameLoad body Return NameLoad Return NameLoad orelse If AttributeLoad NameLoad attr body If CompareEq NameLoad NameLoad body If AttributeLoad NameLoad attr body Return NameLoad If BoolOpAnd AttributeLoad NameLoad attr CompareEq NameLoad NameLoad body Return NameLoad If BoolOpAnd AttributeLoad NameLoad attr CompareEq NameLoad NameLoad body Return NameLoad Return NameLoad decorator_list decorator_list
N/A N/A 
Permission logic module to  manage users' self-modifications
 permission.conf settings permission.logics.base PermissionLogic OneselfPermissionLogic N/A PermissionLogic N/A N/A 
    Permission logic class to manage users' self-modifications

    Written by quasiyoke.
    https://github.com/lambdalisue/django-permission/pull/27
     __init__ N/A N/A self any_permission change_permission delete_permission N/A None None None N/A N/A 
        Constructor

        Parameters
        ----------
        any_permission : boolean
            True for give any permission of the user to himself.
            Default value will be taken from
            ``PERMISSION_DEFAULT_OSPL_ANY_PERMISSION`` in
            settings.
        change_permission : boolean
            True for give change permission of the user to himself.
            It will be ignored if :attr:`any_permission` is True.
            Default value will be taken from
            ``PERMISSION_DEFAULT_OSPL_CHANGE_PERMISSION`` in
            settings.
        delete_permission : boolean
            True for give delete permission of the user to himself.
            It will be ignored if :attr:`any_permission` is True.
            Default value will be taken from
            ``PERMISSION_DEFAULT_OSPL_DELETE_PERMISSION`` in
            settings.
         N/A N/A self any_permission any_permission N/A N/A self change_permission change_permission N/A N/A self delete_permission delete_permission N/A N/A N/A self any_permission None N/A N/A N/A self any_permission N/A settings PERMISSION_DEFAULT_OSPL_ANY_PERMISSION N/A N/A N/A self change_permission None N/A N/A N/A self change_permission N/A settings PERMISSION_DEFAULT_OSPL_CHANGE_PERMISSION N/A N/A N/A self delete_permission None N/A N/A N/A self delete_permission N/A settings PERMISSION_DEFAULT_OSPL_DELETE_PERMISSION N/A has_perm N/A N/A self user_obj perm obj N/A None N/A N/A 
        Check if user have permission of himself

        If the user_obj is not authenticated, it return ``False``.

        If no object is specified, it return ``True`` when the corresponding
        permission was specified to ``True`` (changed from v0.7.0).
        This behavior is based on the django system.
        https://code.djangoproject.com/wiki/RowLevelPermissions

        If an object is specified, it will return ``True`` if the object is the
        user.
        So users can change or delete themselves (you can change this behavior
        to set ``any_permission``, ``change_permissino`` or
        ``delete_permission`` attributes of this instance).

        Parameters
        ----------
        user_obj : django user model instance
            A django user model instance which be checked
        perm : string
            `app_label.codename` formatted permission string
        obj : None or django model instance
            None or django model instance for object permission

        Returns
        -------
        boolean
            Wheter the specified user have specified permission (of specified
            object).
         N/A N/A N/A N/A user_obj is_authenticated N/A N/A False N/A change_permission N/A N/A self get_full_permission_string change N/A delete_permission N/A N/A self get_full_permission_string delete N/A N/A obj None N/A N/A N/A self any_permission N/A N/A True N/A N/A N/A self change_permission N/A perm change_permission N/A N/A True N/A N/A N/A self delete_permission N/A perm delete_permission N/A N/A True N/A False N/A N/A N/A user_obj is_active N/A N/A N/A obj user_obj N/A N/A N/A self any_permission N/A N/A True N/A N/A N/A self change_permission N/A perm change_permission N/A N/A True N/A N/A N/A self delete_permission N/A perm delete_permission N/A N/A True N/A False N/A N/A