simple-rbac icon indicating copy to clipboard operation
simple-rbac copied to clipboard

Refactor Role/Resource Model

Open tonyseek opened this issue 12 years ago • 3 comments

This project uses a static defination to find parent relationship of roles and resources. That way is hard to handle a situation that a role or a resource has a dynamic parents getter.

Currently my solution is using a proxy class to register parent defination rules implicatly. But this way is ugly and broken the Zen of Python.

I have a plan to refactor the role model and resource model, give them a flexible way to use more dynamic rules.

tonyseek avatar Nov 15 '12 17:11 tonyseek

Can you elaborate on your plan more and maybe give a concrete example? Would such a system be able to handle an implementation of a "wildcard" acls, perhaps?

I'm evaluating this system for my own use and may be able to contribute.

sholsapp avatar Jun 23 '14 16:06 sholsapp

Maybe it would even be worth looking into using an existing RBAC like https://pypi.python.org/pypi/simple-rbac/0.1.1 so this project could focus on the Flask-specific parts. What do you think?

sholsapp avatar Jun 23 '14 22:06 sholsapp

I'm sorry for this delayed plan because of lacking mind for designing it : (

so this project could focus on the Flask-specific parts

This project don't have any knownledge about web frameworks like Flask.

tonyseek avatar Jul 02 '14 15:07 tonyseek