I am trying to give some custom roles within specific custom permissions This answer has not been found anywhere
role_ability.rb
Role of the class Cancen :: Ability Deaf Initialize (user) user || User.new # if user.has_role for guest? What can "Administrators" do: Management, All Elsf user.has_role? "Retailer": can manage, product and can: be read: all end and end I thought it could be a popular idea that the user should manage the role manager Management and some other models ...
If I change
elsif user.has_role? "Retail" can: management, product to
elsif user.has_role? "Retailer": can manage, all it does the requisite work ... I can use all administrative areas
I only "retailer" Be able to: Tho manage the products !! ;)
"Administrators" have a role associated with only one user, i.e. all roles are users.
You can probably see where it is, retailers can sign up and sell items
To do this, there is a native way in spree_auth_devise to do this, but this is not the document.
section: "Experiment in existing rail applications"
Comments
Post a Comment