* Set default styles and move button style out of form * Add MVP of Preact /settings/integrations * Change background color on hover and focus * Remove unused constructor * Improve optimistic rendering * Add display name * Use loading indicator for optimistic rendering * WIP test * Add basic snapshot tests
19 lines
283 B
Ruby
19 lines
283 B
Ruby
class GithubRepoPolicy < ApplicationPolicy
|
|
def create?
|
|
!user_is_banned?
|
|
end
|
|
|
|
def update?
|
|
!user_is_banned? && user_is_owner?
|
|
end
|
|
|
|
def permitted_attributes
|
|
%i[github_id_code featured]
|
|
end
|
|
|
|
private
|
|
|
|
def user_is_owner?
|
|
record.user_id == user.id
|
|
end
|
|
end
|