* Started matching spam and suspended roles * Match spam and suspended roles in most cases * Fixed check_suspended for unauthenticated users
11 lines
235 B
Ruby
11 lines
235 B
Ruby
class GithubRepoPolicy < ApplicationPolicy
|
|
def index?
|
|
!user.spam_or_suspended? && user.authenticated_through?(:github)
|
|
end
|
|
|
|
alias update_or_create? index?
|
|
|
|
def permitted_attributes
|
|
%i[github_id_code featured]
|
|
end
|
|
end
|