Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
tabulator-another
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
tabulator-another
Commits
bdbcf7e0
Commit
bdbcf7e0
authored
Jun 16, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update deckbuf permission
parent
8f6f9ccf
Pipeline
#37709
passed with stages
in 4 minutes and 51 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
6 deletions
+34
-6
src/participant/participant.service.ts
src/participant/participant.service.ts
+22
-4
src/srvpro/srvpro.service.ts
src/srvpro/srvpro.service.ts
+1
-0
src/tournament/tournament.service.ts
src/tournament/tournament.service.ts
+11
-2
No files found.
src/participant/participant.service.ts
View file @
bdbcf7e0
...
@@ -24,16 +24,34 @@ export class ParticipantService extends CrudService(Participant, {
...
@@ -24,16 +24,34 @@ export class ParticipantService extends CrudService(Participant, {
super
(
repo
);
super
(
repo
);
}
}
getParticipant
(
id
:
number
,
user
:
MycardUser
)
{
wipeDeckbuf
(
return
this
.
findOne
(
id
,
(
qb
)
=>
user
:
MycardUser
|
number
,
participant
:
Participant
,
_tournament
?:
Tournament
,
)
{
const
tournament
=
_tournament
||
participant
.
tournament
;
if
(
!
tournament
)
return
;
try
{
tournament
.
checkPermission
(
user
);
}
catch
(
e
)
{
participant
.
deckbuf
=
undefined
;
}
}
async
getParticipant
(
id
:
number
,
user
:
MycardUser
)
{
const
res
=
await
this
.
findOne
(
id
,
(
qb
)
=>
Tournament
.
extraQueryForUser
(
user
,
qb
,
'
tournament
'
),
Tournament
.
extraQueryForUser
(
user
,
qb
,
'
tournament
'
),
);
);
this
.
wipeDeckbuf
(
user
,
res
.
data
);
return
res
;
}
}
getParticipants
(
dto
:
Partial
<
Participant
>
,
user
:
MycardUser
)
{
async
getParticipants
(
dto
:
Partial
<
Participant
>
,
user
:
MycardUser
)
{
return
this
.
findAll
(
dto
,
(
qb
)
=>
const
res
=
await
this
.
findAll
(
dto
,
(
qb
)
=>
Tournament
.
extraQueryForUser
(
user
,
qb
,
'
tournament
'
),
Tournament
.
extraQueryForUser
(
user
,
qb
,
'
tournament
'
),
);
);
res
.
data
?.
forEach
((
p
)
=>
this
.
wipeDeckbuf
(
user
,
p
));
return
res
;
}
}
async
createParticipant
(
dto
:
Participant
,
user
:
MycardUser
)
{
async
createParticipant
(
dto
:
Participant
,
user
:
MycardUser
)
{
...
...
src/srvpro/srvpro.service.ts
View file @
bdbcf7e0
...
@@ -23,6 +23,7 @@ export class SrvproService {
...
@@ -23,6 +23,7 @@ export class SrvproService {
tournamentId
,
tournamentId
,
userId
,
userId
,
);
);
res
.
data
?.
checkPermission
(
userId
);
return
new
SRVProTournamentDto
(
res
.
data
);
return
new
SRVProTournamentDto
(
res
.
data
);
}
}
...
...
src/tournament/tournament.service.ts
View file @
bdbcf7e0
...
@@ -68,14 +68,23 @@ export class TournamentService extends CrudService(Tournament, {
...
@@ -68,14 +68,23 @@ export class TournamentService extends CrudService(Tournament, {
const
result
=
await
this
.
findOne
(
id
,
(
qb
)
=>
const
result
=
await
this
.
findOne
(
id
,
(
qb
)
=>
Tournament
.
extraQueryForUser
(
user
,
qb
,
this
.
entityAliasName
),
Tournament
.
extraQueryForUser
(
user
,
qb
,
this
.
entityAliasName
),
);
);
result
.
data
?.
participants
?.
forEach
((
p
)
=>
this
.
participantService
.
wipeDeckbuf
(
user
,
p
,
result
.
data
),
);
result
.
data
?.
analytics
();
result
.
data
?.
analytics
();
return
result
;
return
result
;
}
}
getTournaments
(
dto
:
Partial
<
Tournament
>
,
user
:
MycardUser
|
number
)
{
async
getTournaments
(
dto
:
Partial
<
Tournament
>
,
user
:
MycardUser
|
number
)
{
return
this
.
findAll
(
dto
,
(
qb
)
=>
const
res
=
await
this
.
findAll
(
dto
,
(
qb
)
=>
Tournament
.
extraQueryForUser
(
user
,
qb
,
this
.
entityAliasName
),
Tournament
.
extraQueryForUser
(
user
,
qb
,
this
.
entityAliasName
),
);
);
res
.
data
?.
forEach
((
t
)
=>
t
.
participants
?.
forEach
((
p
)
=>
this
.
participantService
.
wipeDeckbuf
(
user
,
p
,
t
),
),
);
return
res
;
}
}
createTournament
(
tournament
:
Tournament
,
user
:
MycardUser
|
number
)
{
createTournament
(
tournament
:
Tournament
,
user
:
MycardUser
|
number
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment