Fork me on GitHub

Category Permissions  Bottom

  • according to this thread, back in April 2008, Jorn solved the problem of site-wide category-based permissions. It appears that a module should be able to implement:

    Code

    $permFilter = array();
            $permFilter[] = array('realm'            => 0,
                                  'component_left'   => 'Categories',
                                  'component_middle' => '',
                                  'component_right'  => 'Category',
                                  'instance_left'    => 'id',
                                  'instance_middle'  => 'path',
                                  'instance_right'   => 'ipath',
                                  'level'            => ACCESS_OVERVIEW);

    and then DBUtil would take care of the rest. but alas, it appears to not be so icon_confused

    when I implement that code and then put in a permissions rule like:

    Code

    Unregistered Categories::Category 510:/__SYSTEM__/Modules/PostCalendar/Events:/1/2/509/510 510:/__SYSTEM__/Modules/PostCalendar/Events:/1/2/509/510


    I just get errors all over:

    Code

    exit handler:Permission filter instance is invalid: [__PN_PERM_NO_SUCH_ITEM__], [__PN_PERM_NO_SUCH_ITEM__], [__PN_PERM_NO_SUCH_ITEM__]


    also - when I look at News or Pages, they implement callback-type permissions checks for Category information. icon_frown

    Is this not the way it should be done?
  • Well
    Jorn used another method to try to consider the Categories on the DB query, but I'm not sure if it works as expected. This needs a big rework and a central method to accomplish this, but it may be for 1.3 icon_wink

    Merry Christmas Craig

    --
    - Mateo T. -
    Mis principios... son mis fines
  • ticket filed

    Merry Christmas Mateo!

This list is based on users active over the last 60 minutes.