Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Permissions issue with ormaut
  • Hi,

    I have a project on which I use ormauth. I created an user, give it the moderator group and also a few custom roles and permissions. Now when I login with this user, I have access to all permissions which is, of course, not the expected result.

    I dumped the cache permission for this user and this is what I get :

    (Array, 3 elements) 
         0 (Array, 2 elements)
             perso (Array, 1 element)
                 question (Array, 0 elements)
             env (Array, 1 element)
                 login (Array, 0 elements)
         1 (Array, 0 elements)
         2 (Boolean): true
    I clearly suspect the 3th index (true) to be the cause of the issue. But I have no clues on why.

    I also cleared the cache, but without success.

    Thanks.
  • HarroHarro
    Accepted Answer
    It is indeed the 3rd value, indication admin access. The array contains:

        array($current_rights, $revoked_rights, $global_access);

    What version of Fuel are you on? There were some bugs in early 1.7 version regarding the calculation of the users effective rights.
  • I'm on the last version (1.7.3).

    I can read the code until I find the answer, but since you know the code way better than me, maybe you'll find what's wrong...
  • HarroHarro
    Accepted Answer
    I checked the code, all fixes are from before the 1.7.3. release, so that can't be it.

    What role is assigned to this user? I checked the code, the only reason $global_access can be true, is if the user has a role assigned that has the "A" filter.
  • Well I do have a role with the A filter but I throught it was used to add the permissions assigned to this role. Now I read the doc again and I realise my mistake... Good Job Harro, thanks.  

Howdy, Stranger!

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

In this Discussion