-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOMA-8614 News Item Sharing getRecipients proxy function #4374
Conversation
78ce404
to
a19b2f5
Compare
}, | ||
{ | ||
access: true, | ||
type: 'type GetNewsSharingRecipientsOutput { id: String!, name: String!, recipients: Int }', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
recipients
must be a number
or an object
. If it is a number, then we can call it resipientsCount
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, will change to recipientsCount (this reallly is just the number of subscribers :-) )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
apps/condo/domains/news/schema/GetNewsSharingRecipientsService.test.js
Outdated
Show resolved
Hide resolved
const organizationId = get(b2bContext, 'organization', null) | ||
if (!organizationId) { return false } | ||
|
||
return await checkPermissionInUserOrganizationOrRelatedOrganization(user.id, organizationId, 'canReadNewsItems') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why canReadNewsItems
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was made intentionally. If you can read and manage newsItems, then you can send news to telegram and other services
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...you can read and manage newsItems, then you can send news to telegram and other services
What about to check canManage
permission?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will double check it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, changed permission to canManageNewsItems. Thanks!
fix(condo) DOMA-7397 finish GetNewsSharingRecipientsService code fix(condo) DOMA-7397 learn how to launch query fix(condo) DOMA-7397 add example api fix(condo) DOMA-7397 add TESTS_FAKE_CLIENT_EXPRESS_PORT variable fix(condo) DOMA-7397 add new error fix(condo) DOMA-7397 fix more tests fix(condo) DOMA-7397 figure out translations fix(condo) DOMA-7397 figure out graphql types fix(condo) DOMA-7397 figure out tests fix(condo) DOMA-7397 maketypes
…d introduce a set of functions in test.utils.js
604380f
to
10e50ff
Compare
Quality Gate passedIssues Measures |
So, we need a small proxy function to call News Sharing Miniapp's getRecipients function