You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Rails Authorization Plugin
Hey everyone, does anyone know the method that removes a single role
from a user? Say I have a user.is_friend_of @targetuser. How would I
remove the role 'friend' from the current user with the corresponding
@targetuser.
Gokul Janga
unread,
Sep 27, 2009, 2:54:42 AM9/27/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Rails Authorization Plugin
When you add acts_as_authorized_user, you also get the following
method
has_no_role(role_name,authorizable_ob)
[ so you can say @user.has_no_role('friend',@targetuser) ]
see the code in object_roles_table.rb in the plugin.