#76 ✓resolved
Guillermo Farias

Cannot view shared accounts

Reported by Guillermo Farias | July 23rd, 2009 @ 11:28 PM | in 0.9.7 "Steinitz"

I'm not sure if this is only happening to me, but here it goes....

Whenever i create a shared account, the people i share it with cannot see the account, it shows them a message: "the account is no longer available"

I went through the code and i think i found where the possible bug is:
in user_permissions.rb (under /vendor/plugins/uses_user_permission/lib/) line 46-47.

it says:

:conditions => ["#{self.table_name}.user_id=? OR #{self.table_name}.assigned_to=? OR permissions.user_id=? OR access='Public'",

              options[:user] || options, options[:user] || options, options[:user] || options[:user] ]

and i think it should be:

:conditions => ["#{self.table_name}.user_id=? OR #{self.table_name}.assigned_to=? OR permissions.user_id=? OR access='Public'",

              options[:user] || options, options[:user] || options, options[:user] || options ]

What changed? The last "options[:user]" to "options"

This solved the problem for me. Oh, by the way, you should restart your server after making this change.

Mike, please correct me if i'm wrong, i'm really new at this.. in fact i learned rails thanks to your code, never seen rails before, now i love it.

Mike, keep up the good work, i really like the way you code. Or better yet, the way you ruby! :)

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Ruby on Rails CRM platform for Web 2.0 and beyond

People watching this ticket

Referenced by

Pages