symfony
symfony forum
Home » support » General discussion » User Permission System BETA 2
User Permission System BETA 2 [message #11207] Wed, 30 August 2006 19:21 Go to next message
Draven  is currently offline Draven
Messages: 760
Registered: January 2006
Faithful Member
I've taken most of the suggestions given in the first beta of my RBAC user system and did some major recontructing. The changes are as follows:

1. Now supports I18n
2. Now uses the admin generator to handle all user management instead of the user_admin module
3. Includes entire admin theme
4. supports permission management across infinite applications within a project.
5. Now manages logins for both front and backend apps all configured from the backend app. I did this since a majority of users will be using the admin generator to administer their applications.
6. Database redesigned to utilize new symfony beta many-to-many relations and simplified naming conventions.

There is now a wiki page explaining usage and installation at http://www.symfony-project.com/trac/wiki/UserRbac

NOTE: This system requires functionality from the symfony 1.0 Beta release.


Please post any feedback here.

[Updated on: Wed, 30 August 2006 19:38]

Re: User Permission System BETA 2 [message #11212 is a reply to message #11207 ] Wed, 30 August 2006 22:33 Go to previous messageGo to next message
Antik  is currently offline Antik
Messages: 106
Registered: July 2006
Senior Member
Just install...

Very very very nice Smile

I love this design. Like in mambo Smile

Found one error:

Fatal error: Call to undefined method Modules::getEnv() in F:\Server\domains\rbac\apps\admin\modules\modules\templates\ _env.php on line 5

.. after i click on "edit module"

Symfony Version: 0.7.1847

And i do not understand how to edit permission table? Link to permisions needed in menu...

UPD: Another error:
Fatal error: Call to a member function getUsername() on a non-object in F:\Server\domains\rbac\apps\admin\modules\permission\actions \actions.class.php on line 40

... after i click on icon "Create permision"

[Updated on: Wed, 30 August 2006 22:41]

Re: User Permission System BETA 2 [message #11214 is a reply to message #11212 ] Wed, 30 August 2006 23:02 Go to previous messageGo to next message
Draven  is currently offline Draven
Messages: 760
Registered: January 2006
Faithful Member
Antik wrote on Wed, 30 August 2006 22:33


And i do not understand how to edit permission table? Link to permisions needed in menu...

UPD: Another error:
Fatal error: Call to a member function getUsername() on a non-object in F:\Server\domains\rbac\apps\admin\modules\permission\actions \actions.class.php on line 40

... after i click on icon "Create permision"


You do not access the permissions module directly, that is why there is no link to the permission module directly. As per the documents in the wikki you set permissions by clicking the permission icon (the key) next to a Role under the Role List link or next to a User under the User List. Do not try to access the permissions module directly. It is not designed to set permissions in that way, you must specify a user or role to edit permissions for.

I will have a look at _env.php error, that was removed and replaced with _app.php.

[Updated on: Wed, 30 August 2006 23:10]

Re: User Permission System BETA 2 [message #11216 is a reply to message #11214 ] Wed, 30 August 2006 23:07 Go to previous messageGo to next message
Draven  is currently offline Draven
Messages: 760
Registered: January 2006
Faithful Member
I've corrected the error in the modules module that was looking for _env.php instead of _app.php. The new files have been attached to the wikki page.
Re: User Permission System BETA 2 [message #11277 is a reply to message #11207 ] Thu, 31 August 2006 18:07 Go to previous messageGo to next message
Draven  is currently offline Draven
Messages: 760
Registered: January 2006
Faithful Member
Well I've been forced to make an update. Thanks to propel!

I was originally loading all the permissions into an array on each page request, however, it seems when you start to get a large amount of permissions propel screeches to a halt and causes very long page load times as it tries to join each permission with it's module counter part. /sigh

So I've opted to have the entire permission set pulled once from the DB at login and store the serialized array into the user session. Not the most optimal choice unfortunately but alas I don't see a work around at this time.

We could query the permissions only for the module and action you are currently viewing. However, this means that additional checks for permissions outside the action, or even module, would require additional queries and thus lengthening the request time. I'll keep searching for a better alternative, in the mean time I'd love to hear any other options you may have.

Another option would be to create another "session" table and load all the permissions into a table row and just query that single row by userid each time you need to load the entire permission set. Perhaps that is the best bet as it avoids large user sessions if you have many permissions. /sigh
Re: User Permission System BETA 2 [message #11439 is a reply to message #11277 ] Tue, 05 September 2006 09:26 Go to previous messageGo to next message
tweety  is currently offline tweety
Messages: 26
Registered: June 2006
Location: India
Junior Member
just Install

found and error

Fatal error: Class 'sfUserRbac' not found in /usr/local/php/lib/php/symfony/user/sfUser.class.php on line 103

I don't how to fix it and I'm using symfony version 0.7.1914


With Regards

Tweety
Re: User Permission System BETA 2 [message #11465 is a reply to message #11207 ] Tue, 05 September 2006 15:19 Go to previous messageGo to next message
Draven  is currently offline Draven
Messages: 760
Registered: January 2006
Faithful Member
Check that you have the proper settings in your factories.yml file of your apps and that it uses

  user:
    class: sfUserRbac



Did you copy the whole folder or did you move individual files? Possible you missed something?

Also can you post your web debug so I can see exactly what is, and isn't, being loaded?
Re: User Permission System BETA 2 [message #11625 is a reply to message #11465 ] Thu, 07 September 2006 11:38 Go to previous messageGo to next message
tweety  is currently offline tweety
Messages: 26
Registered: June 2006
Location: India
Junior Member
I copied the entire folder that solve the previous error.

Now found new error

[sfViewException]
Unable to load "I18n" helper in: /var/www/test/apps/admin/modules/users/lib/helper, /var/www/test/apps/admin/lib/helper, /var/www/test/lib/plugins/symfony/helper, /usr/local/php/lib/php/symfony/helper, /var/www/test/lib, /var/www/test/apps/admin/lib, /usr/local/php/lib/php/symfony/vendor, ., /usr/local/php/lib/php
stack trace

    * at ()
      in SF_SYMFONY_LIB_DIR/helper/HelperHelper.php line 68 ...
              65.       // search in the include path
              66.       if ((@include_once('helper/'.$fileName)) != 1)
              67.       {
              68.         throw new sfViewException(sprintf('Unable to load "%s" helper in: %s', $helperName, implode(', ', array_merge($dirs, explode(PATH_SEPARATOR, get_include_path())))));
              69.       }
              70.     }
  71.
    * at use_helper('I18n')
     

What cause this error?

I have not initiate I18NFiles this might cause the problem


With Regards

Tweety
Re: User Permission System BETA 2 [message #11638 is a reply to message #11625 ] Thu, 07 September 2006 13:24 Go to previous messageGo to next message
francois  is currently offline francois
Messages: 1627
Registered: October 2005
Faithful Member
I suggest that the ones interested in User Permission System should have a look at the new sfGuard plugin

http://www.symfony-project.com/trac/wiki/sfGuardPlugin

[Updated on: Thu, 07 September 2006 13:25]

Re: User Permission System BETA 2 [message #11644 is a reply to message #11207 ] Thu, 07 September 2006 14:40 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 8767
Registered: January 2006
Location: West Midlands, UK
Faithful Member
That's interesting; does sfGuard do much the same as Draven's system? If so, it would be a shame to expend work on both unnecessarily, rather than having twice as many programmers working on just one of them!

Rolling Eyes


Remember Gaza
Re: User Permission System BETA 2 [message #11651 is a reply to message #11207 ] Thu, 07 September 2006 15:43 Go to previous messageGo to next message
Draven  is currently offline Draven
Messages: 760
Registered: January 2006
Faithful Member
Frankly I'm a bit annoyed no one mentioned this plugin was being made and that all my work was in vain. And to post in my modules thread not to use it is frankly a bit unfair.

Thank you for making my attempt at helping the community utterly useless.

good-bye.
Re: User Permission System BETA 2 [message #11652 is a reply to message #11651 ] Thu, 07 September 2006 16:05 Go to previous messageGo to next message
francois  is currently offline francois
Messages: 1627
Registered: October 2005
Faithful Member
Hi Draven,

About not telling you:

This module has been worked on by Fabien for the past 6 months, a little here and there, but has never really been functionning. The goal was to release it as a plugin, and we had to rework the plugin system before releasing it.

The approach is a little different than yours, and when we eventually decided to finalize it, it was easier to start from what we had written (which we knew about) than what you had written (which we downloaded, installed, had a quick look at and decided that it was not what we wanted).

At that time (about a week ago), maybe we should have told you, I'm sorry for that, but it wouldn't have changed much. And we wouldn't tell you to stop your module before because we never stop people from developping things, and we didn't know if ours would be finished one day.

All in all, I think that the two modules can live together, since we don't have the same approach.

About publishing in your thread:

I didn't mean to offend you but to help the people looking for a User permission system to find one already working - I don't know about the status of your module but you must agree that people might be interested.

If you feel offended, then I'll remove my posts from this thread and start a new one.

We really try to think about the community, and we welcome all contributions, including yours, so please don't be upset Confused ...
Re: User Permission System BETA 2 [message #11653 is a reply to message #11207 ] Thu, 07 September 2006 16:23 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 8767
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Draven - your sentiments were pretty much what I had in mind when I made my previous post. I sympathise with your position. If we can get some commitment from the core team to make an effort to keep contributors better informed, then it'd be great if you would consider sticking around. I often remark that there are a lot of questioners and not enough answerers in the forum - and you are very good at the second bit!

Smile

Francois - from my humble and relatively new perspective, the community does value your immense efforts to keep the symfony wheels rolling and oiled. I am sure you won't be offended therefore if I offer the criticism that Draven could have been informed earlier about your parallel work, especially given how persistent he has advertised his beta here. He appears to have expended plenty of effort on his system, which might instead have been put towards something your team isn't working on.


Remember Gaza
Re: User Permission System BETA 2 [message #11654 is a reply to message #11207 ] Thu, 07 September 2006 16:30 Go to previous messageGo to next message
Draven  is currently offline Draven
Messages: 760
Registered: January 2006
Faithful Member
I know that in the end this will benefit the community, for that I understand your reasoning. I just feel a bit unappreciated for my efforts as my solution worked around the short comings of the system at the time and tried to achieve it's result without changing core files. Because of this it is inferior. Had I known you were open to altering such a vast portion of the framework to accommodate things like this I could have assisted and would not have spent countless hours trying to find work arounds.

I may have over reacted, but in my eyes this is not the first time my efforts have been taken and implemented without any mention.

Back when I started using symfony I had countless threads on the short comings of the old slot system and mulled over and gave suggestions how a component and/or plugin system could alleviate the problem by allowing logic into these slots. A short time there after the plugin AND new component system was implemented.

A few weeks ago I made several posts concerning the need for a way to package more than just a plugin where modules, configs and so on all needed to be packaged together. Today I log on to find that the entire plugin system has been revamped to do just that AND a complete user permission system which required these things was created.

I don't know, maybe I'm being childish but it really makes me angry when I keep seeing my ideas implemented as though no mention was ever given by the community.

In the end, I'm glad all these things were implemented. I guess I'm just feeling very bitter today and this sent me over the edge.
Re: User Permission System BETA 2 [message #11655 is a reply to message #11653 ] Thu, 07 September 2006 16:33 Go to previous messageGo to next message
francois  is currently offline francois
Messages: 1627
Registered: October 2005
Faithful Member
There are so many things that we work on even without knowing if they will eventually be published...

When Draven first talked about his module, I think our module was less advanced than his one, so there was no point trying to stop him.

The direction that Draven took turned out to be not the one we would have chosen. We understood that lately, when we tried to use his module and saw that it would maybe took us less time to get to our target from our base.

In an ideal world, we would have looked at his code very early, saw that the direction was not the best according to our choices, scheduled the release of our module before his AND be able to tell him to stop.

So again, I'm sorry that you and Draven feel that your work is useless (I think it isn't), but please don't blame us for not communicating enough. Not only do we communicate a lot, but in this particular case, I see no good reason, retrospectively, to tell Draven that he shouldn't work on this suject (or on this solution).
Re: User Permission System BETA 2 [message #11657 is a reply to message #11653 ] Thu, 07 September 2006 16:41 Go to previous messageGo to next message
fabien  is currently offline fabien
Messages: 484
Registered: October 2005
Faithful Member
Administrator
Some explanations from the author of sfGuard, me:

I decided to work on the sfGuard plugin last week-end to show an example of the new plugin system.

I choose to develop a user management system because, we, at sensio, have been developing such systems over and over again. So, I took all our developments and tried to make a plugin out of them. I thought it was a good example because it uses a lot of the new plugin system features.

Your RBAC system was in beta long before my idea for a plugin and long before I started to work on the new plugin system (look at the timeline).

Your work is not lost because:

- Your RBAC system is compatible with symfony 0.6 branch, mine is not (you must install the 0.9 alpha).
- Your RBAC system has more features than sfGuard has now.
- Your RBAC system is i18n, not sfGuard
- sfGuard is still pretty young and untested

I don't think there must be only one identity management plugin for symfony. This is a though subject and I think diversity is very important when dealing with web security.

So, please Draven don't stop your effort on your RBAC system. We need more people like you involved working on symfony enhancements.

Fabien
Re: User Permission System BETA 2 [message #11658 is a reply to message #11655 ] Thu, 07 September 2006 16:47 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 8767
Registered: January 2006
Location: West Midlands, UK
Faithful Member
francois wrote on Thu, 07 September 2006 15:33

I'm sorry that you and Draven feel that your work is useless (I think it isn't)


Actually, I am sure that there is still much value in Draven's work, and I certainly do not think it is useless. However, he may be less inclined to work on it now, given that it inadvertently competes with your system. That said, I agree with Fabien that multiple solutions to the one problem can be actively maintained, and would encourage work on this system to continue if appropriate.

francois wrote on Thu, 07 September 2006 15:33

but please don't blame us for not communicating enough


Perhaps you could you make a post in the Feature Requests forum of your unfinished items, or even open up a new forum for collaborative work? This I think might help. Also, while blame can be overdone, if some responsibility is diplomatically accepted - fairly or otherwise - Draven will feel better about it and hopefully will continue as a member of this fine community.

[rewritten for clarity]

[Updated on: Thu, 07 September 2006 17:04]


Remember Gaza
Re: User Permission System BETA 2 [message #11679 is a reply to message #11658 ] Thu, 07 September 2006 21:19 Go to previous messageGo to next message
chtito  is currently offline chtito
Messages: 512
Registered: March 2006
Location: Sweden
Faithful Member
Where is my post?

I wrote a post on that thread earlier today. Where is it?

I don't write posts for them to be deleted. It takes time to write an answer or an opinion. I WANT TO BE INFORMED BEFORE ANY OF MY POSTS ARE DELETED.

Mad Mad
Re: User Permission System BETA 2 [message #11680 is a reply to message #11679 ] Thu, 07 September 2006 21:23 Go to previous messageGo to next message
francois  is currently offline francois
Messages: 1627
Registered: October 2005
Faithful Member
Chtito: I erased the posts above. The discussion can go on on our emails.
Re: User Permission System BETA 2 [message #11714 is a reply to message #11207 ] Fri, 08 September 2006 12:14 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 8767
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Hi Draven and chtito,

I'm sorry for the difficulties you experienced on the forum yesterday - I have expressed my dissappointment privately to the originator. I would hate for either of you to leave as a result of what has been said, though that decision would be understandable. Chtito, you are right that this open source project is for everyone, not just the code committers - and the project really could use you both! I have updated my email address in my profile bio, if you want to get in touch offline.

Best wishes both Very Happy

Halfer


Remember Gaza
Re: User Permission System BETA 2 [message #11735 is a reply to message #11207 ] Fri, 08 September 2006 15:25 Go to previous messageGo to next message
Draven  is currently offline Draven
Messages: 760
Registered: January 2006
Faithful Member
TO clarify a few things, I'd first like to say that the outcome yesterday was regretable at best, and I'm just as much responsible for my part as the others invloved. For now I consider this matter closed and hopefully we can all move on.

In other news, Fabien has agreed to grant me commit rights and involvement with the further development of the sfGaurd plugin and I'll be working to merge the two projects into one full fledge permission system (albiet with some changes). Given that the plugin system has changed so much, it will take some time to do but I believe this will bring the best of both worlds together. I'll be able to remove a lot of the unfavourable work arounds I had to do in my RBAC system and hopefully expand on some of the ideas Fabien has on the system.
Re: User Permission System BETA 2 [message #11740 is a reply to message #11735 ] Fri, 08 September 2006 15:55 Go to previous messageGo to next message
moreweb  is currently offline moreweb
Messages: 108
Registered: August 2006
Location: Italy
Senior Member
Good choice guys!!! Wink
Re: User Permission System BETA 2 [message #11755 is a reply to message #11207 ] Fri, 08 September 2006 19:06 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 8767
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Bravo, glad to have you stay on!

Very Happy Very Happy


Remember Gaza
Re: User Permission System BETA 2 [message #11770 is a reply to message #11755 ] Sat, 09 September 2006 00:30 Go to previous messageGo to next message
yoyo  is currently offline yoyo
Messages: 78
Registered: January 2006
Location: Poland
Member

wow, great
Re: User Permission System BETA 2 [message #11773 is a reply to message #11207 ] Sat, 09 September 2006 01:39 Go to previous messageGo to next message
marckohlbrugge  is currently offline marckohlbrugge
Messages: 164
Registered: January 2006
Senior Member
Yay!

Looking forward to the "sfGuard RBAC" thing!
Re: User Permission System BETA 2 [message #13138 is a reply to message #11773 ] Mon, 02 October 2006 11:45 Go to previous messageGo to next message
haZe  is currently offline haZe
Messages: 78
Registered: September 2006
Member
Quote:

I copied the entire folder that solve the previous error.

Now found new error

[sfViewException]
Unable to load "I18n" helper in: /var/www/test/apps/admin/modules/users/lib/helper, /var/www/test/apps/admin/lib/helper, /var/www/test/lib/plugins/symfony/helper, /usr/local/php/lib/php/symfony/helper, /var/www/test/lib, /var/www/test/apps/admin/lib, /usr/local/php/lib/php/symfony/vendor, ., /usr/local/php/lib/php
stack trace

* at ()
in SF_SYMFONY_LIB_DIR/helper/HelperHelper.php line 68 ...
65. // search in the include path
66. if ((@include_once('helper/'.$fileName)) != 1)
67. {
68. throw new sfViewException(sprintf('Unable to load "%s" helper in: %s', $helperName, implode(', ', array_merge($dirs, explode(PATH_SEPARATOR, get_include_path())))));
69. }
70. }
71.
* at use_helper('I18n')



What cause this error?

I have not initiate I18NFiles this might cause the problem


i have exactly the same error how do you fixed it or how can i fix it Smile
Re: User Permission System BETA 2 [message #13156 is a reply to message #13138 ] Mon, 02 October 2006 15:59 Go to previous messageGo to next message
Draven  is currently offline Draven
Messages: 760
Registered: January 2006
Faithful Member
haZe wrote on Mon, 02 October 2006 11:45



i have exactly the same error how do you fixed it or how can i fix it Smile


THis module is no longer being developed, I've taken over development of the sfGuardPlugin and a new version is available through SVN checkout which has a majority of the functionality of this.
Re: User Permission System BETA 2 [message #13236 is a reply to message #13156 ] Wed, 04 October 2006 08:24 Go to previous messageGo to next message
tweety  is currently offline tweety
Messages: 26
Registered: June 2006
Location: India
Junior Member
hello haZe,

If you still want to use RBAC then replace all the I18n with I18N or simply copy I18NHelper.php to I18nHelper.php in
/usr/local/php/lib/php/symfony/helper/



With Regards

Tweety
Re: User Permission System BETA 2 [message #13239 is a reply to message #13236 ] Wed, 04 October 2006 09:45 Go to previous messageGo to next message
tweety  is currently offline tweety
Messages: 26
Registered: June 2006
Location: India
Junior Member
How can I get sfGuardPlugin new version?
Re: User Permission System BETA 2 [message #13253 is a reply to message #13239 ] Wed, 04 October 2006 15:04 Go to previous messageGo to next message
Draven  is currently offline Draven
Messages: 760
Registered: January 2006
Faithful Member
tweety wrote on Wed, 04 October 2006 09:45

How can I get sfGuardPlugin new version?



Do an SVN checkout of it in the symfony SVN under plugins.

http://www.symfony-project.com/trac/browser/plugins
Re: User Permission System BETA 2 [message #13261 is a reply to message #11207 ] Wed, 04 October 2006 15:35 Go to previous messageGo to next message
COil  is currently offline COil
Messages: 465
Registered: September 2006
Faithful Member

I think i will test it for my next project. Smile


my Symfony Blog - http://www.strangebuzz.com
The symfony web debug bar as a standalone library : PEAR::PHP_Debug
Re: User Permission System BETA 2 [message #13262 is a reply to message #13261 ] Wed, 04 October 2006 15:42 Go to previous messageGo to next message
Draven  is currently offline Draven
Messages: 760
Registered: January 2006
Faithful Member
COil wrote on Wed, 04 October 2006 15:35

I think i will test it for my next project. Smile


Just a little heads up, I have tested it and it seems to be stable but there may still be a few bugs.

Also unlike the RBAC system, you must manually add credentials to the DB and security.yml files since the system now supports credentials on several levels (Global, Module and module/action).

When I get some time I'll try to create some docs.
Re: User Permission System BETA 2 [message #13296 is a reply to message #11439 ] Thu, 05 October 2006 09:00 Go to previous message
haZe  is currently offline haZe
Messages: 78
Registered: September 2006
Member
hi tweety,

thanks for your answer, now it works Smile
Previous Topic:edit in place
Next Topic:[reopened] db2propel local (new last post)
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software