Skip to content
Snippets Groups Projects
Commit fbdf0578 authored by Douwe Maan's avatar Douwe Maan
Browse files

Remove private_token from API user entity

parent a72d6879
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -410,8 +410,7 @@ GET /user
"can_create_group": true,
"can_create_project": true,
"two_factor_enabled": true,
"external": false,
"private_token": "dd34asd13as"
"external": false
}
```
 
Loading
Loading
Loading
Loading
@@ -57,10 +57,6 @@ module API
expose :admin?, as: :is_admin
end
 
class UserWithPrivateDetails < UserWithAdmin
expose :private_token
end
class Email < Grape::Entity
expose :id, :email
end
Loading
Loading
Loading
Loading
@@ -507,9 +507,7 @@ module API
end
get do
entity =
if sudo?
Entities::UserWithPrivateDetails
elsif current_user.admin?
if current_user.admin?
Entities::UserWithAdmin
else
Entities::UserPublic
Loading
Loading
Loading
Loading
@@ -27,11 +27,9 @@
"can_create_group",
"can_create_project",
"two_factor_enabled",
"external",
"private_token"
"external"
],
"properties": {
"$ref": "full.json",
"private_token": { "type": "string" }
"$ref": "full.json"
}
}
Loading
Loading
@@ -14,7 +14,5 @@
"provider":null,
"is_admin":false,
"can_create_group":false,
"can_create_project":false,
"private_token":"Wvjy2Krpb7y8xi93owUz",
"access_token":"Wvjy2Krpb7y8xi93owUz"
"can_create_project":false
}
Loading
Loading
@@ -14,7 +14,5 @@
"provider":null,
"is_admin":false,
"can_create_group":false,
"can_create_project":false,
"private_token":"Wvjy2Krpb7y8xi93owUz",
"access_token":"Wvjy2Krpb7y8xi93owUz"
}
\ No newline at end of file
"can_create_project":false
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment