app/models/enju_biblio/ability.rb in enju_biblio-0.1.0.pre58 vs app/models/enju_biblio/ability.rb in enju_biblio-0.1.0.pre59
- old
+ new
@@ -17,13 +17,15 @@
can [:destroy, :delete], Item do |item|
item.removable?
end
can [:read, :create, :update], Manifestation
can [:destroy, :delete], Manifestation do |manifestation|
- manifestation.items.empty? and !manifestation.series_master?
+ manifestation.items.empty? && !manifestation.series_master?
end
can :manage, [
+ AgentMerge,
+ AgentMergeList,
Create,
CreateType,
Donate,
Identifier,
ImportRequest,
@@ -40,27 +42,27 @@
ProduceType,
Realize,
RealizeType,
ResourceImportFile,
ResourceExportFile,
- SeriesStatement
+ SeriesStatement,
+ SeriesStatementMerge,
+ SeriesStatementMergeList
]
can :manage, [
ContentType,
Country,
- Extent,
Frequency,
Language,
License,
MediumOfPerformance,
AgentType
] if LibraryGroup.site_config.network_access_allowed?(ip_address)
can :read, [
CarrierType,
ContentType,
Country,
- Extent,
Frequency,
FormOfWork,
IdentifierType,
Language,
License,
@@ -72,20 +74,22 @@
when 'Librarian'
can :manage, Item
can :index, Manifestation
can [:show, :create, :update], Manifestation
can [:destroy, :delete], Manifestation do |manifestation|
- manifestation.items.empty? and !manifestation.series_master?
+ manifestation.items.empty? && !manifestation.series_master?
end
can [:index, :create], Agent
can :show, Agent do |agent|
agent.required_role_id <= 3
end
can [:update, :destroy, :delete], Agent do |agent|
agent.required_role_id <= 3
end
can :manage, [
+ AgentMerge,
+ AgentMergeList,
Create,
Donate,
Identifier,
ImportRequest,
ManifestationRelationship,
@@ -95,17 +99,18 @@
PictureFile,
Produce,
Realize,
ResourceImportFile,
ResourceExportFile,
- SeriesStatement
+ SeriesStatement,
+ SeriesStatementMerge,
+ SeriesStatementMergeList
]
can :read, [
CarrierType,
ContentType,
Country,
- Extent,
Frequency,
FormOfWork,
IdentifierType,
Language,
License,
@@ -140,11 +145,10 @@
can :read, [
CarrierType,
ContentType,
Country,
Create,
- Extent,
Frequency,
FormOfWork,
Identifier,
IdentifierType,
Language,
@@ -171,10 +175,9 @@
can :read, [
CarrierType,
ContentType,
Country,
Create,
- Extent,
Frequency,
FormOfWork,
Identifier,
IdentifierType,
Item,