Skip to content

Authorization

Mattia Roccoberton edited this page Jun 4, 2023 · 1 revision

Authorization is provided setting the option authorization_class to a class that inherits from the Authorization and that overrides the allowed? class method:

authorization_class: Admin::Perms

While the Perms class could be like this:

moduleAdminclassPerms < TinyAdmin::Plugins::Authorizationclass << selfdefallowed?(user,action,param=nil)returnfalseifaction == :page && param == 'stats'trueendendendend

Clone this wiki locally