Thanks, man! That’s a thing which replaced yiiuser+Rights for me.
I don’t think you need to add a profile like one in yii-user(just take a look if you haven’t yet) - it’s monstrous, like it should be if you want your product to fit all sizes^Wusers. One can add a profile according to his style.
But a thing I need - check if user can access specific page(e.g. in menu creating to show only links he can access), and you have this code as a private method in controller class.
Wouldn’t it be better to put some method UWebUser::accessRoutes() which return all allowed routes and a UWebUser::canAccess($route), which can be used in UAccessController::_isRouteAllowed() to check if specific route is accessible? It’s just about code architecture.
And yes, I can modify classes for my very own requests but someone else will need this someday perhaps.
I have only ONE question?! Is there any real reason of re-inventing wheel?! Yii already has RBAC, and at first sight yii’s version is much more flexible. I just puzzled…why you did it?!
It has just no any advantage. All that you need - add GUI for built-in RBAC or get extension that is doing it for you.
Replacing built-in RBAC with something that looks same and more hardcoded is very bad idea, for any real project. As for learning purposes and hobby - fine.