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

Require open source license for project creation #553

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

annavik
Copy link
Member

@annavik annavik commented Sep 4, 2024

Summary

Fixes https://github.com/RolnickLab/ami-admin/issues/21

In this PR we block project creation client side, unless open source license has been selected. We still show the other option, but disabled.

Left to do on the backend side

  • Store selected license (let me know what format we should use)
  • Make a similar blocking of project creation from API, if we want to be in the safe side :)

Screenshot

Skärmavbild 2024-09-04 kl  15 07 32

@annavik annavik requested a review from mihow September 4, 2024 13:35
Copy link

netlify bot commented Sep 4, 2024

Deploy Preview for ami-storybook ready!

Name Link
🔨 Latest commit 863e30e
🔍 Latest deploy log https://app.netlify.com/sites/ami-storybook/deploys/66d9092ca3dbac0008ba9c31
😎 Deploy Preview https://deploy-preview-553--ami-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Sep 4, 2024

Deploy Preview for ami-dev ready!

Name Link
🔨 Latest commit 863e30e
🔍 Latest deploy log https://app.netlify.com/sites/ami-dev/deploys/66d9092c8ce86d0008730dcd
😎 Deploy Preview https://deploy-preview-553--ami-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 32
Accessibility: 89
Best Practices: 92
SEO: 100
PWA: 70
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -13,5 +13,9 @@ export const convertToServerFormData = (fieldValues: any) => {
data.append('image', '')
}

if (fieldValues.openSource) {
data.append('license', 'open-source')
Copy link
Member Author

Choose a reason for hiding this comment

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

Let's tweak this, if backend prefers the license to be passed in a different way.

@mihow
Copy link
Collaborator

mihow commented Sep 5, 2024

Thanks @annavik! I am going to think about the backend part. I think we should check for this acceptance before every image sync or processing job. In-case the option gets unchecked, and also for existing projects.

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