Change to apply page to had object_auth

This commit is contained in:
Matthew K. Fu JuYuan authored and Christophe Vilayphiou committed 2012-05-14 12:40:50 +08:00
1 parent f0dd1eb871
commit 9ba4c2cf2f
15 files changed
+95 -11

No files matched your search

+8
View File
@@ -20,6 +20,14 @@ class User
belongs_to :role
has_and_belongs_to_many :sub_roles
accepts_nested_attributes_for :attribute_values, :allow_destroy => true
def self.current
Thread.current[:user]
end
def self.current=(user)
Thread.current[:user] = user
end
def avb_apps
sub_role_ids_ary=self.sub_roles.collect{|t| t.id}