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
-
Mike Dvorkin July 24th, 2009 @ 11:26 AM
- State changed from new to open
Wow! Looks like a typo. Thanks for digging in and finding it. Congratulations, very impressive for somebody who is new with Rails!
-
Mike Dvorkin July 24th, 2009 @ 11:33 AM
- State changed from open to resolved
(from [84606972f98151bbc62f1b725bf51b15caaa552c]) Fixed a typo that affected individual permissions (thanks, Guillermo!) [#76 state:resolved] http://github.com/michaeldv/fat_free_crm/commit/84606972f98151bbc62...
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.
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
Tags
Referenced by
- 76 Cannot view shared accounts (from [84606972f98151bbc62f1b725bf51b15caaa552c]) Fixed a...