Module: Shared::SharedAcrossProjects

Extended by:
ActiveSupport::Concern
Included in:
GeographicItem, Namespace, Person, PreparationType, Role::SourceRole, Serial, SerialChronology, Source
Defined in:
app/models/concerns/shared/shared_across_projects.rb

Overview

All models that are referenced across projects include this code

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) can_destroy?(user)

Returns:

  • (Boolean)


12
13
14
# File 'app/models/concerns/shared/shared_across_projects.rb', line 12

def can_destroy?(user)
  !self.is_in_use? && ( user.is_administrator? || self.creator == user )
end

- (Boolean) can_edit?(user)

Returns:

  • (Boolean)


16
17
18
# File 'app/models/concerns/shared/shared_across_projects.rb', line 16

def can_edit?(user)
  # stub
end