[symfony-users] Re: User group and permission in sfGuardPlugin

2009-09-16 Thread veasna.phal

Hello Abraham Montilla, Hello Tom,

Thanks very much for the answers.
I did it as you told me, It works, but I'm not sure the point that Tom
said:
 default:
  is_secure: on
  credentials: [admin]
Because I have created one permission by my own named
administratorPermission, so in the credentials option should I
change it from [admin] to [administratorPermission] or not?

Another questions about the userguard:

I have a table called Employee have some fields like first_name,
last_name,... and I want to use the these two fields as an username
for the login and store it in the table sf_guard_user.
How can I add these fields in to the sf_guard_user?
How can I modify the sfGuardsPlugin schema.yml?
How to create the first admin user to login into the system at the
first time?
I have tried to alter the schema and read the user profile that the
sfGuardsPlugin document explain, but I seem understand nothing about
this.

Please help me for this point,

Thanks in advance,

Best regards,

Veasna Phal.


On Sep 3, 2:47 am, Abraham Montilla amontil...@gmail.com wrote:
 Hello Veasna, to set the credentials allowed to an application or module go
 to project-name/apps/app-name/config/security.yml (in the case of an
 app) or
 project-name/apps/app-name/modules/module-name/config/security.yml (in
 the case of a module, you have to create this file as symfony doesn't
 generate it by deffault), then add a credentials line like this:

 //project-name/apps/app-name/config/security.yml
 default:
   is_secure: on
   credentials: permission-name

 the permission-name is one of your permissions (by default there's only an
 admin permission if you use the fixture file given by the plugin) in the
 model, so try adding several permissions and then when you try to access the
 app (or the module) with a user with a different permission the message You
 don't have the required permission to access this page. will show up, this
 only works if the users you create are not super-admins, this attribute make
 that an user can bypass all credentials.

 I've never worked with groups, permissions for me are just enough. However,
 try setting the line in the security.yml file like this:

   credentials: group-name

 and see if works.

 Good Luck!

 2009/9/2 veasna.phal veasna.p...@gmail.com





  Dear all,

  I am currently a new symfony starter. Now I am in day 13 The User,
  and I have a problem with user group and permission.

  The question is How can I give the credential to the group and how to
  enable it. Because when I try to create a different user in different
  group that have different permission. It always redirect to backend as
  a super administrator for normal user that i didn't tick as a super
  administrator it show me the message You don't have the required
  permission to access this page..

  Please kindly help me I really want your answers.

  Thanks in advance,

  Best regards,

  Veasna

 --
 Have a nice day.
 Abraham Montilla.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] User group and permission in sfGuardPlugin

2009-09-02 Thread veasna.phal

Dear all,

I am currently a new symfony starter. Now I am in day 13 The User,
and I have a problem with user group and permission.

The question is How can I give the credential to the group and how to
enable it. Because when I try to create a different user in different
group that have different permission. It always redirect to backend as
a super administrator for normal user that i didn't tick as a super
administrator it show me the message You don't have the required
permission to access this page..

Please kindly help me I really want your answers.

Thanks in advance,

Best regards,

Veasna

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---