File: //home/arjun/projects/env/lib/python3.10/site-packages/bouncer/__pycache__/__init__.cpython-310.pyc
o
N�>S� � @ s` d Z dZddlmZmZ ddlmZ dd� Zdd� Zd d
� Z da
dd
� Zdd� ZdZ
dd� ZdS )z�
bouncer
-------
Simple Declarative Authentication DSL inspired by Ryan Bates excellent cancan library
:copyright: (c) 2014 by Jonathan Tushman.
:license: MIT, see LICENSE for more details.
�jtushman� )�Rule�Ability)�AccessDeniedc C � t | t� �}|�||�S )aM Checks if a given user has the ability to perform the action on a subject
:param user: A user object
:param action: an action string, typically 'read', 'edit', 'manage'. Use bouncer.constants for readability
:param subject: the resource in question. Either a Class or an instance of a class. Pass the class if you
want to know if the user has general access to perform the action on that type of object. Or
pass a specific object, if you want to know if the user has the ability to that specific instance
:returns: Boolean
�r �get_authorization_method�can��user�action�subject�ability� r �I/home/arjun/projects/env/lib/python3.10/site-packages/bouncer/__init__.pyr s r c C r )zinverse of ``can``)r r �cannotr
r r r r s r c C s"