Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
2 Questions for Ormauth
  • Hi, i have 2 questions concerning Ormauth :

    1. In the DB, what's the utility of the field "actions" in the tables "users_permissions" ? We have "actions" in other tables like "users_user_permissions", "users_role_permissions", etc..

    2. What means "area" in permissions ? It's can be for example "frontend", "backend" ?

    Because i wan't to create system permission with controller and action. I would see somethings like this :

    <backend/frontend/or module ?>.<controller>[<action>]

    This is correct ?
  • In Simpleauth, you only have two levels of permissions, so you can check for "blog.read" or "comments.[read,write]".

    Ormauth adds an extra level to that, while maintaining compatibility with Simpleauth.

    In our applications, "area" is the name of the module, permission is the function to perform (could be one-to-one with a controller, but not always so), and within that you can define actions to add more granularity to the permission. So we have checks like "admin.users[list,add,modify,delete]" for someone that needs to maintain the users of the application.

    There is no set rule on how you should use it, if you want another system, go ahead. You're completely free to what you put in the area and permission columns.

    When calling has_access() you can either check on "area.permission", "area.permission.action" or "area.permission.[action,action,action]".
  • Ok i see better now how, thanks !

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion