Skip to main content

maxwin permission

Project description


maxwin 团队 的确权管理

Permission 的使用
> 中设定权限系统名称,比如:maxwinweb

.. code-block:: python

class DevelopmentConfig(Config):
SYSTEM_NAME = 'maxwinweb'

class ProductionConfig(Config):
SYSTEM_NAME = os.environ.get('SYSTEM_NAME','maxguideweb')

> 中创建Permission对象

.. code-block:: python

from mwpermission.permission import Permission

app = Flask(__name__)
# 设定permission_url 来访问权限资料,推荐在开发模式下使用
p = Permission()

> 权限检测,检查当前用户对 maxguideweb 中的employee的 浏览,删除权限,能否看到身份证等隐私权限,方法: @p.check('system_name3',['op']) ,p.check_permission(systemname3,op)

.. code-block:: python

# 检查 员工的浏览权限
def employees_id_get(id,jwt = None):

# 检查员工的删除
def employees_id_delete(id,jwt = None):

def employee_check_auth():
# 检查是否有看到身份证的权限

``pip install mwpermission``



- fix gbk error


- 增加readme
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mwpermission, version 0.1.21
Filename, size File type Python version Upload date Hashes
Filename, size mwpermission-0.1.21.tar.gz (3.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page