Add class for Ray's check-box

Fix some typos
Change the default index for auth
Add some hard code in object_auth.rb to handle page_context
A user cannot select himself in authorisation
This commit is contained in:
chris committed 2013-07-31 00:08:15 +08:00
1 parent b1755bdc80
commit d632439f80
10 files changed
+45 -28

No files matched your search

+6 -2
View File
@@ -15,8 +15,12 @@ class ObjectAuth < PrototypeAuth
end
def check_user_has_can_access_app
sub_managing_users = auth_obj.module_app.sub_managing_users rescue []
module_app = auth_obj.module_app
if auth_obj.is_a?(PageContext)
module_app = ModuleApp.where(key: 'page_content').first
else
module_app = auth_obj.module_app
end
sub_managing_users = module_app.sub_managing_users rescue []
self.auth_users.each do |auth_user|
if !sub_managing_users.include? auth_user && !auth_user.admin?
module_app.assign_sub_manager(auth_user,User.current)