This repository has been archived by the owner on Jul 21, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tim Trautmann
committed
Jan 11, 2012
1 parent
f3ccdce
commit c15d5b3
Showing
5 changed files
with
446 additions
and
379 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
authorization do | ||
role :guest do | ||
# no permissions | ||
end | ||
|
||
role :user do | ||
includes :guest | ||
has_permission_on :assets, :to => [:read, :request, :history, :diff] | ||
has_permission_on :instantiations, :to => [:read] | ||
has_permission_on :users, :to => [:show, :update] do | ||
if_attribute :id => is { user.id } | ||
end | ||
end | ||
|
||
role :cataloger do | ||
includes :user | ||
has_permission_on :assets, :to => [:create] | ||
has_permission_on :assets, :to => [:update, :delete] do | ||
if_attribute :creator_id => is { user.id } | ||
end | ||
has_permission_on :subjects, :to => [:read] | ||
has_permission_on :instantiatons, :to => [:create] | ||
has_permission_on :instantiations, :to => [:update, :delete] do | ||
if_attribute :creator_id => is { user.id } | ||
end | ||
end | ||
|
||
role :editor do | ||
includes :user | ||
has_permission_on :assets, :to => :crud | ||
has_permission_on :instantiations, :to => :crud | ||
has_permission_on :subjects, :to => [:crud] | ||
end | ||
|
||
role :admin do | ||
includes :editor | ||
has_permission_on :last_used_ids, :to => :index | ||
has_permission_on :templates, :to => :crud | ||
has_permission_on :users, :to => :crud | ||
has_permission_on :users, :to => :make_admin do | ||
if_attribute :id => is_not { user.id } | ||
end | ||
has_permission_on :picklists, :to => :crud | ||
(PicklistsController::SUBCLASSES - ['subjects']).each do |kl| | ||
has_permission_on kl.to_sym, :to => :crud | ||
end | ||
has_permission_on :assets, :to => :multilend | ||
has_permission_on :assets, :to => :destroy_found_set | ||
has_permission_on :assets, :to => :replace | ||
has_permission_on :ip_blocks, :to => :crud | ||
has_permission_on :value_lists, :to => :crud | ||
has_permission_on :reports, :to => :index | ||
end | ||
end | ||
|
||
privileges do | ||
privilege :read, :includes => [:index, :show] | ||
privilege :create, :includes => :new | ||
privilege :update, :includes => :edit | ||
privilege :borrow, :includes => [:borrowings, :return] | ||
privilege :crud, :includes => [:create, :read, :update, :destroy] | ||
privilege :merge, :includes => :multiprocess | ||
privilege :video, :includes => [:upload_video, :thumbnail, :upload_thumbnail] | ||
privilege :replace, :includes => :do_replace | ||
end |
Empty file.
Submodule deploy
updated
from b57eec to 279aba
Oops, something went wrong.