First version for App and Object auth.Taking Announcement as experiment
This commit is contained in:
1 parent
3bcd7ea349
commit
cc550c5745
28 files changed
+146
-34
No files matched your search
@@ -1,8 +1,12 @@
|
||||
class Admin::ObjectAuthsController < ApplicationController
|
||||
include OrbitCoreLib::PermissionUnility
|
||||
layout "admin"
|
||||
before_filter :authenticate_user!
|
||||
before_filter :check_if_user_can_do_object_auth
|
||||
# before_filter :is_admin? ,:only => :index
|
||||
|
||||
|
||||
|
||||
def index
|
||||
# if current_user.admin?
|
||||
@object_auths = ObjectAuth.all
|
||||
@@ -70,7 +74,11 @@ class Admin::ObjectAuthsController < ApplicationController
|
||||
def edit
|
||||
@object_auth = ObjectAuth.find(params[:id])
|
||||
end
|
||||
|
||||
|
||||
|
||||
private
|
||||
def check_if_user_can_do_object_auth
|
||||
unless check_permission(:manager)
|
||||
render :nothing => true, :status => 403
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user