开发者

Symfony : How to use permission / groups with sfGuardAuth

I just saw that there is no so much documentation about sfGuardAuth groups and permission.

I have a permission named : moderator I have 3 groups : full_time / half_time开发者_StackOverflow / quarter_time

In my backend (symfony 1.4 / doctrine), I have 5 modules Only these two have to be visible for this : [st_job / st_offers ...].

Generic rule : I want that the moderator can edit an offer but NEVER delete it

Specific rule : I want that a full_time moderator can only see/edit full_time jobs or full_time offers Same with half_time moderator can only see/edit half time jobs / offers ....

I didn't find after research how to do that ? I only manage to create my groups / permission on the backend and that's all. Thanks !


You may be interested in reading the following: http://trac.symfony-project.org/wiki/sfGuardPluginExtraDocumentation

Should give you a good idea of how to interact with the plugin to accomplish what you are trying to do.

A typical usage, is that upon a successful login, you check the user's role, and activate/deactivate options on your webpage accordingly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜