How to add in Permissions for custom addons
Let's say an addon has custom permissions like for example, with hgtonight's Yaga, one of the permissions are (without quotation marks) "Yaga.Reactions.Add". But, how do they do it? Let's stick with Yaga and say that I want a permission for Yaga.Reactions.Promote to give users permission to use "Promote". This can be any permission, but Yaga is just an example. This will show you how to add custom permissions for applications / plugins.
1: Go to the settings folder of the application and open about.php in a code editor.
2: Where it says 'RegisterPermissions' => array(, you should see all the permissions that the application adds to Vanilla. Go to the bottom of the last permission above ) and add the permission you want. For example, my custom permission may be (without quotation marks) " 'Application.Topic.Permission', // What can you do? ". Once you upload the new about.php file to your website, it will require disabling the app and enabling the app again.
For a plugin, that would be the same thing but in class.theplugin.plugin.php in the root folder of where all the plugin files are stored
Please correct me if anything in this post is incorrect. Enjoy your new permissions!