This is too small to make for a recipe, but I'll post it just in case
someone searches the same thing later on (if this is not the right
place tell me):
I wanted to set permissions in a way that anyone can create a user,
but only some can view them. "self.id == nil" made the trick:
<pre>
def view_permitted?(field)
user_is?(acting_user) || acting_user.administrator? || self.id ==
nil
end
</pre>
Found the idea in
https://groups.google.com/forum/?fromgroups#!searchin/hobousers/view_permitted/hobousers/DNZvWk80Mcs/EhuY4IEjYQgJ
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.