ZF-Commons / zfc-rbac

Role-based access control module to provide additional features on top of Zend\Permissions\Rbac
BSD 3-Clause "New" or "Revised" License
181 stars 111 forks source link

GUI tool #158

Open bakura10 opened 10 years ago

bakura10 commented 10 years ago

Hi everyone (ping @ocramius @danizord @spiffyjr @arekkas @Pittiplatsch)

I had an idea: with the existing release of ZfcRbac and all the work we are putting in it, I'm really confident to say that we have an awesome module here.

However the only problem for now is that usage is a bit complicated, and each user will likely create its own business logic and interface to manage roles and permissions. I think we can dissociate two main cases:

1) Applications where the set of roles and permissions are quite rigid. For instance, you have a set of common type members (visitors, admins, users) and a set of permissions, and maybe a bunch of permissions.

2) More complex applications where users can themselves create new roles, assigns permissions...

In all cases, there is one common thing:

Well, the idea is to create a new module, called "zfc-rbac-admin". Of course, this module would be based on ZfcRbac and would provide, like Apigility, a web application that you could use and where you could easily create roles, permissions, associate assertions to permissions, associate roles to users.

This would be an EmberJS application (because I know this better than Angular, and love it), that would use a simple REST API. Therefore, this API could even be reused if you want to have your own admin system.

Is this just a crazy idea or is this something you'd really like?

I'm not saying I could do this now, but this could be SO USEFUL and allow safer programming that if you are interested in this project, we could start thinking about it!

aeneasr commented 10 years ago

This could be pretty useful. I've actually avoided doing this part until now. However, we'll probably need this ourselves and since the framework I'm working on will be open-source (it's currently closed-source) I could talk to our chief and release that part of the framework earlier. However, this could take some time as our priorities lie elsewhere and I'm not sure if we want this to be RESTful. Also I think it would be cool to make this collaborative where 3 or 4 developers work on it simoultaniously.

aeneasr commented 10 years ago

(We also have a frontend engineer and a designer who could help with the frontend)

bakura10 commented 10 years ago

My associate is designer too :).

The idea is to first begin using a common set of services for admin purposes, like a RoleService to create, delete, associate permission to roles. An IdentityService to associate roles to permissions... This would be a "based" to everyone could use, without even needing gui tool.

Of course, it would be an opinionated module, and would provide its own entity, so obviously it won't fit for more complex use cases.

Ocramius commented 10 years ago

See MCNI18n - he already did it and it's awesome /cc @macnibblet

I'm -1 on ember.js, but since I won't have time to work on it, I guess that's not weighing much here.

bakura10 commented 10 years ago

Hu? What's the point with MCNI18n and ZfcRbac ? :D

Ocramius commented 10 years ago

@bakura10 nothing, just that the same kind of approach was taken.

bakura10 commented 10 years ago

I see :D... Anyway I'll think more about it :). But I won't have time to do this for now anyway. That was just an idea.

Pittiplatsch commented 10 years ago

The idea is nice, but as you @bakura10 noticed yourself, in a first step, the module will have to make assumptions about used entities, which makes it almost useless for existing applications. It could be tried to make the module highly pluggable by using interfaces, callbacks and things, but this would probably increase complexity significantly... So, maybe this module should rather be seen as kind of skeleton which can be used out-of-the box when starting an application on the greenfield, useful for new users on gathering experience - similar to ZF skeleton.

danizord commented 10 years ago

Very nice idea. :+1: I'd really love to see a CRUD using those awesome tools/libs :)

steverhoades commented 10 years ago

I think this is a great idea, has any progress been made in this regard?

bakura10 commented 10 years ago

No. I think the idea is good too, my problem is that we should have some kind of coordination between modules that need GUI. Some kind of ZFGui thing where we could plug logic per module. But this would need ton of work and, currently, I'm not sure this is something the community is willing to do :).

apolloclark commented 10 years ago

I'd be interested in helping. Should the module be based on Apigility or stand-alone controllers? Which should come first: wireframes, API design, DB schema, MVC code layout?

danizord commented 10 years ago

@apolloclark Should probably be based on ZfrRest :D

macnibblet commented 10 years ago

@danizord, i could probably be up for writing the backend part using ZfrRest

danizord commented 10 years ago

@macnibblet great! @bakura10 we could do that GUI integration stuff in ZfcAdmin, what do you think?