change view and action for announcement ,Lin checked. Also add validation for object_auth make sure for each object,the object will be unique for each action.
This commit is contained in:
1 parent
8932615f05
commit
cceb785a8d
16 files changed
+58
-55
No files matched your search
@@ -101,7 +101,7 @@ class Admin::ModuleAppsController < ApplicationController
|
||||
end
|
||||
#user is not permited to do that
|
||||
flash[:notice] = t('admin.app_auth.operation_not_permitted')
|
||||
redirect_to :action => "edit" # [TODO] maybe need to redirect to some other page
|
||||
render :nothing => true, :status => 403
|
||||
end
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ class Admin::ModuleAppsController < ApplicationController
|
||||
end
|
||||
#user is not permited to do that
|
||||
flash[:notice] = t('admin.app_auth.operation_not_permitted')
|
||||
redirect_to :action => "edit" # [TODO] maybe need to redirect to some other page
|
||||
render :nothing => true, :status => 403
|
||||
end
|
||||
|
||||
end
|
||||
@@ -27,8 +27,13 @@ class Admin::ObjectAuthsController < ApplicationController
|
||||
|
||||
def create
|
||||
obj = eval(params[:object_auth][:type]).find params[:object_auth][:obj_id]
|
||||
@object_auth=obj.object_auths.create :title=> params[:object_auth][:title]
|
||||
redirect_to edit_admin_object_auth_path(@object_auth)
|
||||
@object_auth=obj.object_auths.build :title=> params[:object_auth][:title]
|
||||
if @object_auth.save
|
||||
redirect_to edit_admin_object_auth_path(@object_auth)
|
||||
else
|
||||
flash[:error] = t('admin.object.a_object_must_have_only_one_object_auth_profile_for_each_action')
|
||||
redirect_to (:back)
|
||||
end
|
||||
end
|
||||
|
||||
def create_role
|
||||
|
||||
Reference in new issue
Block a user