Skip to content
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

Merged
merged 10 commits into from
Mar 13, 2024

Conversation

toplenboren
Copy link
Member

@toplenboren toplenboren commented Feb 8, 2024

So, we need a small proxy function to call News Sharing Miniapp's getRecipients function

@toplenboren toplenboren added 🔬 WIP Not intended to be merged right now, it is a work in progress Stuck 😶‍🌫️ I faced difficulties… labels Feb 8, 2024
@toplenboren toplenboren removed 🔬 WIP Not intended to be merged right now, it is a work in progress Stuck 😶‍🌫️ I faced difficulties… labels Feb 28, 2024
@toplenboren toplenboren changed the title DOMA-7397 News Item Sharing getRecipients proxy function DOMA-8614 News Item Sharing getRecipients proxy function Mar 11, 2024
},
{
access: true,
type: 'type GetNewsSharingRecipientsOutput { id: String!, name: String!, recipients: Int }',
Copy link
Contributor

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

Copy link
Member Author

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 :-) )

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

apps/condo/index.js Outdated Show resolved Hide resolved
const organizationId = get(b2bContext, 'organization', null)
if (!organizationId) { return false }

return await checkPermissionInUserOrganizationOrRelatedOrganization(user.id, organizationId, 'canReadNewsItems')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why canReadNewsItems?

Copy link
Member Author

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

Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will double check it

Copy link
Member Author

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
Copy link

sonarcloud bot commented Mar 13, 2024

Quality Gate Passed Quality Gate passed

Issues
8 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@toplenboren toplenboren merged commit fd745b0 into master Mar 13, 2024
23 checks passed
@toplenboren toplenboren deleted the toplenboren-7397 branch March 13, 2024 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants