Integrate App & Object Auth to announcement with i18n variables. Also changed Role and SubRole i18n var. Checked with Allen

This commit is contained in:
Matthew K. Fu JuYuan authored and Christophe Vilayphiou committed 2012-04-30 00:24:11 +08:00
1 parent 382932036d
commit a46a8898d7
15 files changed
+86 -39

No files matched your search

+5 -1
View File
@@ -19,6 +19,10 @@ module OrbitCoreLib
end
def get_object_auth_by_title(title)
self.object_auths.where({title: title }).first
end
def authed_users(title=nil)
users = []
users = case title
@@ -33,7 +37,7 @@ module OrbitCoreLib
[]
end
else
self.object_auths.where(title: title).first.auth_users rescue []
get_object_auth_by_title(title).auth_users rescue []
end
users
end