Skip to content

Commit

Permalink
show repository domains to unauthenticated api users. #687
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Dec 16, 2020
1 parent e5fb6a2 commit 9e79b37
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
13 changes: 0 additions & 13 deletions app/serializers/client_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,6 @@ class ClientSerializer
object.password.present?
end

attribute :domains,
if:
Proc.new { |object, params|
params[:current_ability] &&
params[:current_ability].can?(
:read_contact_information,
object,
) ==
true
} do |object|
object.domains
end

attribute :contact_email,
if:
Proc.new { |object, params|
Expand Down
13 changes: 0 additions & 13 deletions app/serializers/repository_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,6 @@ class RepositorySerializer
object.is_active.getbyte(0) == 1
end

attribute :domains,
if:
Proc.new { |object, params|
params[:current_ability] &&
params[:current_ability].can?(
:read_contact_information,
object,
) ==
true
} do |object|
object.domains
end

attribute :has_password,
if:
Proc.new { |object, params|
Expand Down

0 comments on commit 9e79b37

Please sign in to comment.