Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
OrmAuth: how to get the rights a group has?
  • As title says, how do you go about getting the rights of a group?

    I want to display the right a group has, but I can't find any clear examples/documentation which explain how to approach this.
  • SyntaxlbSyntaxlb
    Accepted Answer
    $group->permissions ?
  • Is it possible to get an example on how to get this $group->permissions ?

    I have been stuck for a few days now trying to archive this. I did manage to get a list of all the groups that i have made in OrmAuth but i did like to be able to see what roles and permission each group have when i view them.

    Edit:
    Found some code over here, that maybe would help me and others. the code is for user but i guess its just a mather of changing the model used to get the right data.
    http://fuelphp.com/forums/discussion/comment/16611#Comment_16611
  • $group = \Auth\Model\Auth_Group::find($idGroup);
    foreach($group->permissions as $k => $groupperm)
    {
    // $groupperm is \Auth\Model\Auth_Grouppermission Object
    }

Howdy, Stranger!

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

In this Discussion