Project

General

Profile

« Previous | Next » 

Revision 017c63dd

Added by David Davis about 10 years ago

Fixes #4689 - Handle default content views in API/CLI

View differences:

app/models/katello/authorization/content_view.rb
def deletable?
return true if !Katello.config.katello?
return false if default?
::User.allowed_to?([:delete, :create], :content_views, self.id, self.organization)
end
def editable?
return false if default?
::User.allowed_to?(EDIT_PERM_VERBS, :content_views, self.id, self.organization)
end
def promotable?
return false if default?
::User.allowed_to?([:promote], :content_views, self.id, self.organization)
end
......
end
def publishable?
return false if default?
::User.allowed_to?([:publish], :content_views, self.id, self.organization)
end

Also available in: Unified diff