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

requires edit permission to import #51

Merged
merged 4 commits into from
Feb 5, 2024
Merged

requires edit permission to import #51

merged 4 commits into from
Feb 5, 2024

Conversation

haroun
Copy link
Contributor

@haroun haroun commented Jan 30, 2024

Summary

PRO-5564

What are the specific steps to test this change?

It requires the edit permission to see the import utility operation

What kind of change does this PR introduce?

(Check at least one)

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Build-related changes
  • Other

Make sure the PR fulfills these requirements:

  • It includes a) the existing issue ID being resolved, b) a convincing reason for adding this feature, or c) a clear description of the bug it resolves
  • The changelog is updated
  • Related documentation has been updated
  • Related tests have been updated

If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

@haroun haroun self-assigned this Jan 30, 2024
Copy link

linear bot commented Jan 30, 2024

@haroun haroun requested a review from boutell January 31, 2024 13:44
Copy link
Member

@boutell boutell left a comment

Choose a reason for hiding this comment

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

I would say edit and create should be checked, like with copy. The result can be a mix of the two, requiring both is a reasonable solution given the impact of people being able to use this feature can be "a lot" anyway

@haroun haroun requested a review from boutell January 31, 2024 16:34
test/index.js Outdated
@@ -23,6 +23,16 @@ describe('@apostrophecms/import-export', function () {
after(async function() {
await cleanData([ attachmentPath, exportsPath ]);
await t.destroy(apos);

apos = null;
Copy link
Member

Choose a reason for hiding this comment

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

This block runs once "after" the entire thing right? In that case it is unnecessary to manually reset these properties because these variables fall out of scope when the closure goes away after the last test. Unless I'm missing something?

@haroun haroun requested a review from boutell February 5, 2024 12:58
@haroun haroun merged commit 8a7c078 into main Feb 5, 2024
9 checks passed
@haroun haroun deleted the pro-4801-permissions branch February 5, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants