Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Mobile
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
191
Issues
191
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Minds
Minds Mobile
Commits
8fc0005e
Commit
8fc0005e
authored
1 hour ago
by
Martin Santangelo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(feat) force APPROVE_SUBSCRIBER in channel
parent
ec1cafd9
feat/permissions-implementation-model-activitysheet-channels
1 merge request
!387
WIP: Permissions EPIC
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
src/channel/subscription/SubscriptionRequestStore.js
src/channel/subscription/SubscriptionRequestStore.js
+12
-0
No files found.
src/channel/subscription/SubscriptionRequestStore.js
View file @
8fc0005e
...
...
@@ -3,6 +3,8 @@ import { observable, action, extendObservable } from "mobx";
import
api
from
"
../../common/services/api.service
"
;
import
logService
from
"
../../common/services/log.service
"
;
import
UserModel
from
"
../UserModel
"
;
import
sessionService
from
"
../../common/services/session.service
"
;
import
{
FLAG_APPROVE_SUBSCRIBER
}
from
"
../../common/Permissions
"
;
/**
* Subscription request store
...
...
@@ -36,6 +38,11 @@ export default class SubscriptionRequestStore {
* @param {any} request
*/
async
accept
(
request
:
any
):
Promise
<
void
>
{
if
(
!
sessionService
.
getUser
().
can
(
FLAG_APPROVE_SUBSCRIBER
,
true
))
{
return
;
}
try
{
this
.
setInProgress
(
request
,
true
);
await
api
.
put
(
...
...
@@ -54,6 +61,11 @@ export default class SubscriptionRequestStore {
* @param {any} request
*/
async
decline
(
request
:
any
):
Promise
<
void
>
{
if
(
!
sessionService
.
getUser
().
can
(
FLAG_APPROVE_SUBSCRIBER
,
true
))
{
return
;
}
try
{
this
.
setInProgress
(
request
,
true
);
await
api
.
put
(
...
...
This diff is collapsed.
Click to expand it.
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