First complete with manager and submanager

This commit is contained in:
Matthew Fu authored and Christophe Vilayphiou committed 2012-01-24 12:28:32 +08:00
1 parent 4df8ab6cc3
commit 4ed8a2164c
7 files changed
+52 -15

No files matched your search

@@ -1,7 +1,7 @@
class Admin::AppAuthsController < ApplicationController
layout "admin"
before_filter :authenticate_user!
before_filter :is_admin?
# before_filter :is_admin? ,:only => :index
def index
# @roles = Role.all.entries
@@ -12,13 +12,17 @@ class Admin::AppAuthsController < ApplicationController
# obj_auth = obj.send "auth"
# [:app_obj => app,:auth_field => obj_auth]
# end
@module_apps = ModuleApp.all
if current_user.admin?
@module_apps = ModuleApp.all
else
@module_apps = current_user.managing_apps.collect{|t| t.managing_app}
end
end
def edit
@module_app = ModuleApp.find(params[:id])
end
end