Updated Authorization for member, link, tag, archive

This commit is contained in:
saurabhbhatia 2013-08-27 10:13:39 +08:00
parent 155722519b
commit b970ea1e0e
34 changed files with 22 additions and 95 deletions

View File

@ -1,8 +1,5 @@
class Admin::TagsController < OrbitBackendController class Admin::TagsController < OrbitBackendController
include OrbitTag::Merging include OrbitTag::Merging
before_filter :force_order_for_visitor, only: [:index]
before_filter :force_order_for_user, except: [:index]
def index def index
@tags = @module_app.module_tags @tags = @module_app.module_tags

View File

@ -3,8 +3,7 @@ class Admin::UsersNewInterfaceController < OrbitMemberController
helper MemberHelper helper MemberHelper
before_filter :set_attribute,:except => [:index,:show] before_filter :set_attribute,:except => [:index,:show]
prepend_filter :set_public, :only => [:index, :show] open_for_visitor :only => [:index, :show]
def index def index
get_tags get_tags

View File

@ -1,11 +1,8 @@
class Panel::Archive::BackEnd::ArchiveFileCategorysController < OrbitBackendController class Panel::Archive::BackEnd::ArchiveFileCategorysController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :for_app_manager,:except => [:index,:get_categorys_json,:get_archive_files_json] open_for_manager :except => [:index,:get_categorys_json,:get_archive_files_json]
open_for_sub_manager :except => [:index,:get_categorys_json,:get_archive_files_json]
before_filter :force_order_for_visitor,:only=>[:index,:get_categorys_json,:get_archive_files_json]
before_filter :force_order_for_user,:except => [:index,:get_categorys_json,:get_archive_files_json]
before_filter :for_app_sub_manager,:except => [:index,:get_categorys_json,:get_archive_files_json]
def index def index
@archive_file_categorys = get_categories_for_index("ArchiveFileCategory") @archive_file_categorys = get_categories_for_index("ArchiveFileCategory")

View File

@ -2,13 +2,7 @@ class Panel::Archive::BackEnd::ArchiveFilesController < OrbitBackendController
# before_filter :for_app_manager,:except => [:index,:show] # before_filter :for_app_manager,:except => [:index,:show]
# include OrbitControllerLib::DivisionForDisable # include OrbitControllerLib::DivisionForDisable
before_filter :force_order_for_visitor,:only=>[:index] open_for_sub_manager :except => [:index]
before_filter :force_order_for_user,:except => [:index]
before_filter :for_app_sub_manager,:except => [:index]
# before_filter :only => [ :new,:edit,:update,:create] do |controller|
# controller.get_categorys('ArchiveFileCategory')
# end
before_filter :only => [ :new, :create, :edit, :update ] do |controller| before_filter :only => [ :new, :create, :edit, :update ] do |controller|
@categories = get_categories_for_form @categories = get_categories_for_form

View File

@ -0,0 +1 @@
<h3>Thank you for your email, we will get back to you soon.</h3>

View File

@ -1,9 +1,7 @@
class Panel::PersonalBook::BackEnd::WritingBookCategorysController < OrbitBackendController class Panel::PersonalBook::BackEnd::WritingBookCategorysController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :force_order_for_visitor,:only=>[:index,:show] open_for_manager :except => [:index]
before_filter :force_order_for_user,:except => [:index,:show]
before_filter :for_app_manager,:except => [:index]
def index def index

View File

@ -3,9 +3,7 @@ class Panel::PersonalBook::BackEnd::WritingBooksController < OrbitBackendControl
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
# before_filter :for_app_manager,:except => [:index,:show]
before_filter :only => [ :new,:edit,:update] do |controller| before_filter :only => [ :new,:edit,:update] do |controller|
controller.get_categorys('WritingBookCategory') controller.get_categorys('WritingBookCategory')
end end

View File

@ -3,8 +3,6 @@ class Panel::PersonalBook::Plugin::WritingBooksController < OrbitBackendControll
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
# before_filter :for_app_manager,:except => [:index,:show] # before_filter :for_app_manager,:except => [:index,:show]
before_filter :only => [ :new,:edit,:update] do |controller| before_filter :only => [ :new,:edit,:update] do |controller|
controller.get_categorys('WritingBookCategory') controller.get_categorys('WritingBookCategory')

View File

@ -2,9 +2,7 @@ class Panel::PersonalConference::BackEnd::WritingConferenceCategorysController <
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :force_order_for_visitor,:only=>[:index,:show] open_for_manager :except => [:index]
before_filter :force_order_for_user,:except => [:index,:show]
before_filter :for_app_manager,:except => [:index]
def index def index

View File

@ -3,8 +3,6 @@ class Panel::PersonalConference::BackEnd::WritingConferencesController < OrbitBa
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
before_filter :only => [ :new,:edit,:update] do |controller| before_filter :only => [ :new,:edit,:update] do |controller|
controller.get_categorys('WritingConferenceCategory') controller.get_categorys('WritingConferenceCategory')

View File

@ -3,8 +3,6 @@ class Panel::PersonalConference::Plugin::WritingConferencesController < OrbitBac
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
before_filter :only => [ :new,:edit,:update] do |controller| before_filter :only => [ :new,:edit,:update] do |controller|
controller.get_categorys('WritingConferenceCategory') controller.get_categorys('WritingConferenceCategory')

View File

@ -3,9 +3,6 @@ class Panel::PersonalDiploma::BackEnd::DiplomasController < OrbitBackendControll
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
# before_filter :for_app_manager,:except => [:index,:show]
def index def index

View File

@ -3,9 +3,6 @@ class Panel::PersonalDiploma::Plugin::DiplomasController < OrbitBackendControlle
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
# before_filter :for_app_manager,:except => [:index,:show]
def index def index

View File

@ -1,9 +1,7 @@
class Panel::PersonalExperience::BackEnd::ExperienceCategorysController < OrbitBackendController class Panel::PersonalExperience::BackEnd::ExperienceCategorysController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :force_order_for_visitor,:only=>[:index,:show] open_for_manager :except => [:index]
before_filter :force_order_for_user,:except => [:index,:show]
before_filter :for_app_manager,:except => [:index]
def index def index

View File

@ -3,8 +3,7 @@ class Panel::PersonalExperience::BackEnd::ExperiencesController < OrbitBackendCo
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
# before_filter :for_app_manager,:except => [:index,:show] # before_filter :for_app_manager,:except => [:index,:show]
before_filter :only => [ :new,:edit,:update] do |controller| before_filter :only => [ :new,:edit,:update] do |controller|
controller.get_categorys('ExperienceCategory') controller.get_categorys('ExperienceCategory')

View File

@ -3,8 +3,6 @@ class Panel::PersonalExperience::Plugin::ExperiencesController < OrbitBackendCon
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
# before_filter :for_app_manager,:except => [:index,:show] # before_filter :for_app_manager,:except => [:index,:show]
before_filter :only => [ :new,:edit,:update] do |controller| before_filter :only => [ :new,:edit,:update] do |controller|
controller.get_categorys('ExperienceCategory') controller.get_categorys('ExperienceCategory')

View File

@ -1,9 +1,7 @@
class Panel::PersonalHonor::BackEnd::HonorCategorysController < OrbitBackendController class Panel::PersonalHonor::BackEnd::HonorCategorysController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :force_order_for_visitor,:only=>[:index,:show] open_for_manager :except => [:index]
before_filter :force_order_for_user,:except => [:index,:show]
before_filter :for_app_manager,:except => [:index]
def index def index

View File

@ -3,9 +3,7 @@ class Panel::PersonalHonor::BackEnd::HonorsController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
# before_filter :for_app_manager,:except => [:index,:show]
before_filter :only => [ :new,:edit,:update] do |controller| before_filter :only => [ :new,:edit,:update] do |controller|
controller.get_categorys('HonorCategory') controller.get_categorys('HonorCategory')
end end

View File

@ -3,9 +3,6 @@ class Panel::PersonalHonor::Plugin::HonorsController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
# before_filter :for_app_manager,:except => [:index,:show]
before_filter :only => [ :new,:edit,:update] do |controller| before_filter :only => [ :new,:edit,:update] do |controller|
controller.get_categorys('HonorCategory') controller.get_categorys('HonorCategory')
end end

View File

@ -2,9 +2,7 @@ class Panel::PersonalJournal::BackEnd::WritingJournalCategorysController < Orbit
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :force_order_for_visitor,:only=>[:index,:show] open_for_manager :except => [:indx]
before_filter :force_order_for_user,:except => [:index,:show]
before_filter :for_app_manager,:except => [:index]
def index def index

View File

@ -3,9 +3,7 @@ class Panel::PersonalJournal::BackEnd::WritingJournalsController < OrbitBackendC
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
# before_filter :for_app_manager,:except => [:index,:show]
before_filter :only => [ :new,:edit,:update] do |controller| before_filter :only => [ :new,:edit,:update] do |controller|
controller.get_categorys('WritingJournalCategory') controller.get_categorys('WritingJournalCategory')
end end

View File

@ -3,9 +3,7 @@ class Panel::PersonalJournal::Plugin::WritingJournalsController < OrbitBackendCo
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
# before_filter :for_app_manager,:except => [:index,:show]
before_filter :only => [ :new,:edit,:update] do |controller| before_filter :only => [ :new,:edit,:update] do |controller|
controller.get_categorys('WritingJournalCategory') controller.get_categorys('WritingJournalCategory')
end end

View File

@ -3,8 +3,6 @@ class Panel::PersonalLab::BackEnd::LabsController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
# before_filter :for_app_manager,:except => [:index,:show] # before_filter :for_app_manager,:except => [:index,:show]
# before_filter :only => [ :new,:edit,:update] do |controller| # before_filter :only => [ :new,:edit,:update] do |controller|
# controller.get_categorys('LabCategory') # controller.get_categorys('LabCategory')

View File

@ -3,8 +3,7 @@ class Panel::PersonalLab::Plugin::LabsController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
# before_filter :for_app_manager,:except => [:index,:show] # before_filter :for_app_manager,:except => [:index,:show]
# before_filter :only => [ :new,:edit,:update] do |controller| # before_filter :only => [ :new,:edit,:update] do |controller|
# controller.get_categorys('LabCategory') # controller.get_categorys('LabCategory')

View File

@ -1,9 +1,7 @@
class Panel::PersonalPatent::BackEnd::WritingPatentCategorysController < OrbitBackendController class Panel::PersonalPatent::BackEnd::WritingPatentCategorysController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :force_order_for_visitor,:only=>[:index,:show] open_for_manager :except => [:index]
before_filter :force_order_for_user,:except => [:index,:show]
before_filter :for_app_manager,:except => [:index]
def index def index

View File

@ -3,8 +3,6 @@ class Panel::PersonalPatent::BackEnd::WritingPatentsController < OrbitBackendCon
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
# before_filter :for_app_manager,:except => [:index,:show] # before_filter :for_app_manager,:except => [:index,:show]
before_filter :only => [ :new,:edit,:update] do |controller| before_filter :only => [ :new,:edit,:update] do |controller|
controller.get_categorys('WritingPatentCategory') controller.get_categorys('WritingPatentCategory')

View File

@ -3,8 +3,6 @@ class Panel::PersonalPatent::Plugin::WritingPatentsController < OrbitBackendCont
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
# before_filter :for_app_manager,:except => [:index,:show] # before_filter :for_app_manager,:except => [:index,:show]
before_filter :only => [ :new,:edit,:update] do |controller| before_filter :only => [ :new,:edit,:update] do |controller|
controller.get_categorys('WritingPatentCategory') controller.get_categorys('WritingPatentCategory')

View File

@ -1,9 +1,7 @@
class Panel::PersonalProject::BackEnd::ProjectCategorysController < OrbitBackendController class Panel::PersonalProject::BackEnd::ProjectCategorysController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :force_order_for_visitor,:only=>[:index,:show] open_for_manager :except => [:index]
before_filter :force_order_for_user,:except => [:index,:show]
before_filter :for_app_manager,:except => [:index]
def index def index

View File

@ -3,8 +3,7 @@ class Panel::PersonalProject::BackEnd::ProjectsController < OrbitBackendControll
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
# before_filter :for_app_manager,:except => [:index,:show] # before_filter :for_app_manager,:except => [:index,:show]
before_filter :only => [ :new,:edit,:update] do |controller| before_filter :only => [ :new,:edit,:update] do |controller|
controller.get_categorys('ProjectCategory') controller.get_categorys('ProjectCategory')

View File

@ -3,8 +3,6 @@ class Panel::PersonalProject::Plugin::ProjectsController < OrbitBackendControlle
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
# before_filter :for_app_manager,:except => [:index,:show] # before_filter :for_app_manager,:except => [:index,:show]
before_filter :only => [ :new,:create,:edit,:update,:create] do |controller| before_filter :only => [ :new,:create,:edit,:update,:create] do |controller|
controller.get_categorys('ProjectCategory') controller.get_categorys('ProjectCategory')

View File

@ -3,8 +3,6 @@ class Panel::PersonalResearch::BackEnd::ResearchsController < OrbitBackendContro
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
def index def index

View File

@ -3,8 +3,6 @@ class Panel::PersonalResearch::Plugin::ResearchsController < OrbitBackendControl
include OrbitControllerLib::DivisionForDisable include OrbitControllerLib::DivisionForDisable
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :force_order_for_visitor,:only=>[:index,:show]
before_filter :force_order_for_user,:except => [:index,:show]
def index def index

View File

@ -8,6 +8,7 @@ module Tag
# author "RD dep" # author "RD dep"
# intro "I am intro" # intro "I am intro"
# update_info 'some update_info' # update_info 'some update_info'
authorizable
side_bar do side_bar do
@ -23,11 +24,6 @@ module Tag
active_for_action: {tags: :index}, active_for_action: {tags: :index},
available_for: [:admin, :manager] available_for: [:admin, :manager]
context_link 'module_authorization',
link_path: "admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: 'Tag'}))",
priority: 2,
active_for_app_auth: 'tags',
available_for: [:admin]
end end
end end
end end

View File

@ -2,10 +2,7 @@ class Panel::WebResource::BackEnd::WebLinksController < OrbitBackendController
# include OrbitControllerLib::DivisionForDisable # include OrbitControllerLib::DivisionForDisable
# before_filter :for_app_manager,:except => [:index,:show] # before_filter :for_app_manager,:except => [:index,:show]
before_filter :force_order_for_visitor,:only=>[:index] open_for_sub_manager :except => [:index]
before_filter :force_order_for_user,:except => [:index]
before_filter :for_app_sub_manager,:except => [:index]
# before_filter :only => [ :new,:edit,:update,:create] do |controller| # before_filter :only => [ :new,:edit,:update,:create] do |controller|
# controller.get_categorys('WebLinkCategory') # controller.get_categorys('WebLinkCategory')
# end # end