You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If app/models/ability.rb exist cms-fortress will use that instead of the built-in CmsAbility.
The feature will generate a model {Rails.root}/app/models/ability.rb that code will look like below:
class Ability < CmsAbility
def setup_role(role_detail, user)
if role_detail.command.eql?('blog.form')
can :manage, BlogModel
elsif role_detail.command.eql?('contacts.list')
can :manage, Contacts
else
warn "#{ role_detail.command } is not yet handled."
end
end
end
Create ability model generator.
The text was updated successfully, but these errors were encountered: