Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Permission Problem with new module
  • Posted: 13.10.2005, 03:43
     
    Grant29
    rank:
    Helper Helper
    registered:
     July 2003
    Status:
    offline
    last visit:
    11.04.06
    Posts:
    261
    Hi,

    I'm working on a custom module and am having problems with permissions.

    The particular function starts out like:

    Code

    function testmodule_admin_addstuff()
    {
     
      echo "Here1<br>";

       if (!pnSecAuthAction(0, 'testmodule', "::", ACCESS_ADD)) {
        return pnVarPrepHTMLDisplay(_MODULENOAUTH);
      }
      echo "Here2<br>";


    I added the echo statement for debugging.

    I created a Group called Friends and added a user to the Friends group.

    I am using these permissions:

    Quote


    1 Admins .* .* Admin
    2 All groups Menublock:: Main Menu:: None
    3 Friends testmodule:: .* Add
    4 Users .* .* Comment
    5 Unregistered Menublock:: User Menu:: None
    6 Unregistered Menublock:: Main Menu:: None
    7 Unregistered .* .* Read


    However, when I log into the account of a user that is a part of the "Friends" group and try to access the function, I get this error:

    Quote


    Sorry! You do not have authorization to access this module


    How can I fix my permissions to make this work?

    Thanks,
    Grant

    --
    Retail Retreat
    http://www.retailretreat.com
  • Posted: 13.10.2005, 21:08
     
    Grant29
    rank:
    Helper Helper
    registered:
     July 2003
    Status:
    offline
    last visit:
    11.04.06
    Posts:
    261
    To try and help debug this, is there a function I can use to print out all the permisions of the currently logged in user?

    Thanks,
    Grant

    --
    Retail Retreat
    http://www.retailretreat.com

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula