Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Settings?

edited February 2012 in Vanilla 2.0 - 2.8

This is a great plugin. I am just wondering if there are settings to change because when I click on the settings in the admin, it says that I don't have permission to make changes. I am logged in as the admin, so I don't know why it would say that.

Tagged:

Answers

  • Sorry but I checked it and there's not any error:

    $Sender->Permission('Garden.AdminUser.Only');
    

    Did you use root admin account?

  • Let's try the new version I have just uploaded :)

  • Garden.AdminUser.Only is not a permission unless you create it.

    If you don't have to avoid creating new permission, unless you are wanting unique statuses. Look in GDN_Permission for existing permissions. You will need to add 'RegisterPermissions'=>array('Plugin.AddThis.SomeTask'), to PluginInfo if it is necessary. The user will still have to enable it for the chosen role. Make sure this is absolutely needed.

    If so use this sort of convention

    Plugin.AddThis.SomeTask it saves a lot of confusion.

    Note SomeTask. Permission are about doing something, and roles are about being something.

    make sense?

    grep is your friend.

  • Sorry but @x00, I just modified it from ShareThis plugins and I already Registed Permissions in plugininfo
    But this is how it work, i though:

      $Menu = $Sender->EventArguments['SideMenu'];
      $Menu->AddLink('Add-ons', T('AddThis'), 'plugin/addthis', 'Garden.Settings.Manage');
    

    Right?
    I'm new with vanilla developing and bad at english :D
    Thanks for your help and I learn one more things :D

    P/s: I don't have anyproblem with the permision, someone installed this plugin and have the same problem ?

  • That merely displays the link

    Change

       public function PluginController_AddThis_Create($Sender) {
        $Sender->Permission('Garden.AdminUser.Only');
    

    to

      public function PluginController_AddThis_Create($Sender) {
        $Sender->Permission('Garden.Settings.Manage');
    

    grep is your friend.

Sign In or Register to comment.