Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
key-storage-agent
Manage
Activity
Members
Labels
Plan
Issues
2
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Code
key-storage-agent
Merge requests
!38
391 device management ability to authorize new device
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
391 device management ability to authorize new device
391-device-management-ability-to-authorize-new-device
into
master
Overview
3
Commits
4
Pipelines
0
Changes
2
Merged
Igor Markin
requested to merge
391-device-management-ability-to-authorize-new-device
into
master
6 years ago
Overview
3
Commits
4
Pipelines
0
Changes
2
Expand
Ticket
https://code.vereign.com/code/dashboard/issues/391
Edited
6 years ago
by
Igor Markin
0
0
Merge request reports
Compare
master
version 3
fb4ef0af
6 years ago
version 2
12693c02
6 years ago
version 1
613d346f
6 years ago
master (base)
and
version 3
latest version
e36cbd43
4 commits,
5 years ago
version 3
fb4ef0af
3 commits,
6 years ago
version 2
12693c02
2 commits,
6 years ago
version 1
613d346f
2 commits,
6 years ago
2 files
+
23
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
handler/
revo
ke.go
→
handler/
manage_device_
ke
y
.go
+
22
−
0
Options
@@ -26,6 +26,28 @@ import (
"golang.org/x/net/context"
)
func
(
s
*
KeyStorageServerImpl
)
SetAuthorized
(
ctx
context
.
Context
,
in
*
api
.
SetAuthorizedRequest
)
(
*
api
.
SetAuthorizedResponse
,
error
)
{
setAuthorizedResponse
:=
&
api
.
SetAuthorizedResponse
{}
setAuthorizedResponse
.
StatusList
=
s
.
updateAll
(
ctx
,
in
.
Uuid
,
func
(
k
*
api
.
Key
)
{
k
.
Unauthorized
=
!
in
.
Value
})
if
setAuthorizedResponse
.
StatusList
!=
nil
{
return
setAuthorizedResponse
,
nil
}
setAuthorizedResponse
.
StatusList
=
utils
.
AddStatus
(
setAuthorizedResponse
.
StatusList
,
"200"
,
api
.
StatusType_INFO
,
"Keys authorization updated"
)
return
setAuthorizedResponse
,
nil
}
func
(
s
*
KeyStorageServerImpl
)
Destroy
(
ctx
context
.
Context
,
in
*
api
.
DestroyRequest
)
(
*
api
.
DestroyResponse
,
error
)
{
destroyResponse
:=
&
api
.
DestroyResponse
{}
destroyResponse
.
StatusList
=
s
.
updateAll
(
ctx
,
in
.
Uuid
,
func
(
k
*
api
.
Key
)
{
k
.
Destroyed
=
true
})
if
destroyResponse
.
StatusList
!=
nil
{
return
destroyResponse
,
nil
}
destroyResponse
.
StatusList
=
utils
.
AddStatus
(
destroyResponse
.
StatusList
,
"200"
,
api
.
StatusType_INFO
,
"Keys destroyed"
)
return
destroyResponse
,
nil
}
func
(
s
*
KeyStorageServerImpl
)
Revoke
(
ctx
context
.
Context
,
in
*
api
.
RevokeRequest
)
(
*
api
.
RevokeResponse
,
error
)
{
revokeResponse
:=
&
api
.
RevokeResponse
{}
Loading