5

its my first real project with Symfony. i need to have some settings like permissions on my backend application.

i know, i must do it with sfDoctrineGuardPlugin. but i don't know how? i have read everthing about sfDoctrineGuardPlugin on symfony website. but i still don't find anything about;

  • how to implements user groups? i need superadmin (i did it), chief editor, editor, author.
  • how to set permissions between them? For example, every author just see their own data. editors can edit what author wrote...

thanks a lot in advanced...

Erman Taylan
  • 383
  • 1
  • 3
  • 12
  • IF you want to do things based on ownership then you need to relate sfGuardUser's to the models which can be owned (or authored) in your case. Then you need to use that relationship to map the proper credential if you plan on using security.yml – prodigitalson Jan 17 '11 at 09:52
  • thanks. i found a way to implement my requirements by http://goo.gl/ocTGr and http://goo.gl/ghtwI – Erman Taylan Jan 18 '11 at 20:46

1 Answers1

2

sfDoctrineGuardPlugin is version 1.4, but should use now symfony2. Anyway, you could use sfDoctrineGuardPlugin + sfDoctrineApplyPlugin. The first is for permissions control and the second if for all the referent about forms and email in the fronted.

Install the plugins is easy check this to links:

Inside all your backend modules, you'll have to create one folder with "config" name inside on it one file with security.yml with this example content:

sets:
 is_secure: true
index:
 is_secure: true

with this, you'll tell to symfony that can the user read or not. Check this url for more information:

# http://www.symfony-project.org/reference/1_4/en/08-Security

If you want protected all the backend with the same permissions put the same folder with the same file inside your application.

Gregoire
  • 3,735
  • 3
  • 25
  • 37
Rubén Fanjul Estrada
  • 1,296
  • 19
  • 31