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,9 +1,6 @@
class Admin::TagsController < OrbitBackendController
include OrbitTag::Merging
before_filter :force_order_for_visitor, only: [:index]
before_filter :force_order_for_user, except: [:index]
def index
@tags = @module_app.module_tags
@module_apps = ModuleApp.where(has_tag: true)

View File

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

View File

@ -1,11 +1,8 @@
class Panel::Archive::BackEnd::ArchiveFileCategorysController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable
before_filter :for_app_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]
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]
def index
@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]
# include OrbitControllerLib::DivisionForDisable
before_filter :force_order_for_visitor,:only=>[: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
open_for_sub_manager :except => [:index]
before_filter :only => [ :new, :create, :edit, :update ] do |controller|
@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
include OrbitControllerLib::DivisionForDisable
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]
open_for_manager :except => [:index]
def index

View File

@ -3,9 +3,7 @@ class Panel::PersonalBook::BackEnd::WritingBooksController < OrbitBackendControl
include OrbitControllerLib::DivisionForDisable
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|
controller.get_categorys('WritingBookCategory')
end

View File

@ -3,8 +3,6 @@ class Panel::PersonalBook::Plugin::WritingBooksController < OrbitBackendControll
include OrbitControllerLib::DivisionForDisable
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|
controller.get_categorys('WritingBookCategory')

View File

@ -2,9 +2,7 @@ class Panel::PersonalConference::BackEnd::WritingConferenceCategorysController <
include OrbitControllerLib::DivisionForDisable
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]
open_for_manager :except => [:index]
def index

View File

@ -3,8 +3,6 @@ class Panel::PersonalConference::BackEnd::WritingConferencesController < OrbitBa
include OrbitControllerLib::DivisionForDisable
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|
controller.get_categorys('WritingConferenceCategory')

View File

@ -3,8 +3,6 @@ class Panel::PersonalConference::Plugin::WritingConferencesController < OrbitBac
include OrbitControllerLib::DivisionForDisable
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|
controller.get_categorys('WritingConferenceCategory')

View File

@ -3,9 +3,6 @@ class Panel::PersonalDiploma::BackEnd::DiplomasController < OrbitBackendControll
include OrbitControllerLib::DivisionForDisable
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

View File

@ -3,9 +3,6 @@ class Panel::PersonalDiploma::Plugin::DiplomasController < OrbitBackendControlle
include OrbitControllerLib::DivisionForDisable
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

View File

@ -1,9 +1,7 @@
class Panel::PersonalExperience::BackEnd::ExperienceCategorysController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable
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]
open_for_manager :except => [:index]
def index

View File

@ -3,8 +3,7 @@ class Panel::PersonalExperience::BackEnd::ExperiencesController < OrbitBackendCo
include OrbitControllerLib::DivisionForDisable
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|
controller.get_categorys('ExperienceCategory')

View File

@ -3,8 +3,6 @@ class Panel::PersonalExperience::Plugin::ExperiencesController < OrbitBackendCon
include OrbitControllerLib::DivisionForDisable
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|
controller.get_categorys('ExperienceCategory')

View File

@ -1,9 +1,7 @@
class Panel::PersonalHonor::BackEnd::HonorCategorysController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable
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]
open_for_manager :except => [:index]
def index

View File

@ -3,9 +3,7 @@ class Panel::PersonalHonor::BackEnd::HonorsController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable
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|
controller.get_categorys('HonorCategory')
end

View File

@ -3,9 +3,6 @@ class Panel::PersonalHonor::Plugin::HonorsController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable
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|
controller.get_categorys('HonorCategory')
end

View File

@ -2,9 +2,7 @@ class Panel::PersonalJournal::BackEnd::WritingJournalCategorysController < Orbit
include OrbitControllerLib::DivisionForDisable
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]
open_for_manager :except => [:indx]
def index

View File

@ -3,9 +3,7 @@ class Panel::PersonalJournal::BackEnd::WritingJournalsController < OrbitBackendC
include OrbitControllerLib::DivisionForDisable
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|
controller.get_categorys('WritingJournalCategory')
end

View File

@ -3,9 +3,7 @@ class Panel::PersonalJournal::Plugin::WritingJournalsController < OrbitBackendCo
include OrbitControllerLib::DivisionForDisable
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|
controller.get_categorys('WritingJournalCategory')
end

View File

@ -3,8 +3,6 @@ class Panel::PersonalLab::BackEnd::LabsController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable
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|
# controller.get_categorys('LabCategory')

View File

@ -3,8 +3,7 @@ class Panel::PersonalLab::Plugin::LabsController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable
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|
# controller.get_categorys('LabCategory')

View File

@ -1,9 +1,7 @@
class Panel::PersonalPatent::BackEnd::WritingPatentCategorysController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable
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]
open_for_manager :except => [:index]
def index

View File

@ -3,8 +3,6 @@ class Panel::PersonalPatent::BackEnd::WritingPatentsController < OrbitBackendCon
include OrbitControllerLib::DivisionForDisable
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|
controller.get_categorys('WritingPatentCategory')

View File

@ -3,8 +3,6 @@ class Panel::PersonalPatent::Plugin::WritingPatentsController < OrbitBackendCont
include OrbitControllerLib::DivisionForDisable
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|
controller.get_categorys('WritingPatentCategory')

View File

@ -1,9 +1,7 @@
class Panel::PersonalProject::BackEnd::ProjectCategorysController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable
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]
open_for_manager :except => [:index]
def index

View File

@ -3,8 +3,7 @@ class Panel::PersonalProject::BackEnd::ProjectsController < OrbitBackendControll
include OrbitControllerLib::DivisionForDisable
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|
controller.get_categorys('ProjectCategory')

View File

@ -3,8 +3,6 @@ class Panel::PersonalProject::Plugin::ProjectsController < OrbitBackendControlle
include OrbitControllerLib::DivisionForDisable
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,:create,:edit,:update,:create] do |controller|
controller.get_categorys('ProjectCategory')

View File

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

View File

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

View File

@ -8,6 +8,7 @@ module Tag
# author "RD dep"
# intro "I am intro"
# update_info 'some update_info'
authorizable
side_bar do
@ -23,11 +24,6 @@ module Tag
active_for_action: {tags: :index},
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

View File

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