Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
duniter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
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
nodes
typescript
duniter
Commits
04d22756
Commit
04d22756
authored
7 years ago
by
Cédric Moreau
Browse files
Options
Downloads
Patches
Plain Diff
[enh] Sandbox: keep `pubkey` + add `issuer` control
parent
5a190a7a
No related branches found
No related tags found
3 merge requests
!1220
Stable/ws2p v1.1 trymerge
,
!1208
Stable/ws2p v1.1
,
!1154
Typage
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/lib/dal/sqliteDAL/DocumentDAL.ts
+3
-1
3 additions, 1 deletion
app/lib/dal/sqliteDAL/DocumentDAL.ts
app/lib/dal/sqliteDAL/SandBox.ts
+4
-2
4 additions, 2 deletions
app/lib/dal/sqliteDAL/SandBox.ts
with
7 additions
and
3 deletions
app/lib/dal/sqliteDAL/DocumentDAL.ts
+
3
−
1
View file @
04d22756
export
interface
DBDocument
{
export
interface
DBDocument
{
issuers
:
string
[];
pubkey
?:
string
issuer
?:
string
issuers
?:
string
[]
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
app/lib/dal/sqliteDAL/SandBox.ts
+
4
−
2
View file @
04d22756
...
@@ -13,7 +13,9 @@ export class SandBox<T extends DBDocument> {
...
@@ -13,7 +13,9 @@ export class SandBox<T extends DBDocument> {
}
}
async
acceptNewSandBoxEntry
(
element
:
T
,
pubkey
:
string
)
{
async
acceptNewSandBoxEntry
(
element
:
T
,
pubkey
:
string
)
{
if
(
element
.
issuers
!==
undefined
&&
element
.
issuers
.
indexOf
(
pubkey
)
!==
-
1
)
{
if
(
element
.
pubkey
===
pubkey
||
element
.
issuer
===
pubkey
||
(
element
.
issuers
!==
undefined
&&
element
.
issuers
.
indexOf
(
pubkey
)
!==
-
1
))
{
return
true
;
return
true
;
}
}
const
elements
=
await
this
.
findElements
()
const
elements
=
await
this
.
findElements
()
...
...
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