Module: Katello::Authorization::Repository

Extended by:
ActiveSupport::Concern
Includes:
Authorizable
Included in:
Repository
Defined in:
app/models/katello/authorization/repository.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#deletable?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'app/models/katello/authorization/repository.rb', line 9

def deletable?
  product.editable? && !promoted?
end

#readable?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'app/models/katello/authorization/repository.rb', line 17

def readable?
  self.class.readable.where("#{self.class.table_name}.id" => self.id).any?
end

#redhat_deletable?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'app/models/katello/authorization/repository.rb', line 13

def redhat_deletable?
  !self.promoted? && self.product.editable?
end