Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CaosDB WebUI Entity Service
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
CaosDB WebUI Entity Service
Commits
a16fb3cf
Commit
a16fb3cf
authored
2 years ago
by
florian
Browse files
Options
Downloads
Patches
Plain Diff
WIP: Copy retrieve and update functions for ACL from other repo
parent
7a5e7b08
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!3
F entity permissions
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/TransactionService.js
+25
-2
25 additions, 2 deletions
src/TransactionService.js
with
25 additions
and
2 deletions
src/TransactionService.js
+
25
−
2
View file @
a16fb3cf
/*
/*
* This file is a part of the CaosDB Project.
* This file is a part of the CaosDB Project.
*
*
* Copyright (C) 2021 IndiScale GmbH <info@indiscale.com>
* Copyright (C) 2021-2023 IndiScale GmbH <info@indiscale.com>
* Copyright (C) 2021 Florian Spreckelsen <f.spreckelsen@indiscale.com>
* Copyright (C) 2021-2023 Florian Spreckelsen <f.spreckelsen@indiscale.com>
* Copyright (C) 2021-2023 Timm Fitschen <t.fitschen@indiscale.com>
*
*
* This program is free software: you can redistribute it and/or modify it under
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* the terms of the GNU Affero General Public License as published by the Free
...
@@ -84,4 +85,26 @@ export class TransactionService {
...
@@ -84,4 +85,26 @@ export class TransactionService {
const
queryRequest
=
this
.
_CreateQueryRequest
(
query
);
const
queryRequest
=
this
.
_CreateQueryRequest
(
query
);
return
new
Promise
(
this
.
_PrepareTransaction
(
queryRequest
));
return
new
Promise
(
this
.
_PrepareTransaction
(
queryRequest
));
}
}
async
retrieveEntityAcl
(
id
)
{
const
client
=
new
api
.
v1
.
EntityTransactionServicePromiseClient
(
this
.
uri
,
null
,
null
);
const
request
=
new
api
.
v1
.
MultiRetrieveEntityACLRequest
();
request
.
addId
(
id
);
const
response
=
await
client
.
multiRetrieveEntityACL
(
request
,
{});
return
convertMessageToEntityACL
(
response
.
getAclsList
()[
0
]);
}
async
updateEntityAcl
(
acl
)
{
const
updateAcl
=
convertEntityAclToMessage
(
acl
);
const
client
=
new
api
.
v1
.
EntityTransactionServicePromiseClient
(
this
.
uri
,
null
,
null
);
const
request
=
new
api
.
v1
.
MultiUpdateEntityACLRequest
();
request
.
setAclsList
([
updateAcl
]);
const
response
=
await
client
.
multiUpdateEntityACL
(
request
,
{});
return
response
;
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment