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

#9583 unadvertised resources #9962

Merged

Conversation

Igi-ID
Copy link
Contributor

@Igi-ID Igi-ID commented Feb 8, 2024

Description

This PR introduces the "Unadvertised" field on creation / edit of resources. Resources which are tagged as unadvertised are viewable and editable only by the owner or admin role users.

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Feature

Issue

What is the current behavior?
#9583 Unadvertised Resources

What is the new behavior?
The "Unadvertised" field is viewable and togglable inside the resource modal on creation/editing. Its value is processed and persisted and resources are filtered accordingly.

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

Added unadvertised field in Metadata.jsx, shown in modal form. Checkbox, controlled.
Adjust handleResourceData.jsx enhancer, include unadvertised field from resource originalData unto props passed to Metadata.jsx.

Added translations for unadvertised field.
@Igi-ID Igi-ID added this to the 2024.01.00 milestone Feb 8, 2024
@Igi-ID Igi-ID self-assigned this Feb 8, 2024
@Igi-ID Igi-ID marked this pull request as ready for review February 8, 2024 14:38
@Igi-ID Igi-ID linked an issue Feb 8, 2024 that may be closed by this pull request
6 tasks
@Igi-ID Igi-ID removed a link to an issue Feb 8, 2024
6 tasks
@Igi-ID Igi-ID linked an issue Feb 8, 2024 that may be closed by this pull request
6 tasks
Copy link
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

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

reviewed and tested ����
@Igi-ID for your future work, take into account that only mandatory localization files are strictly requied (it,en,us,fr,de)

@offtherailz
Copy link
Member

waiting for build to pass (there is a test that fails often and it should be taken into account @tdipisa , I opened an issue for this problem.

As well as deployed, please @ElenaGallo test on dev

@offtherailz offtherailz enabled auto-merge (squash) February 9, 2024 09:40
@offtherailz offtherailz merged commit 593c4d5 into geosolutions-it:master Feb 9, 2024
5 checks passed
@ElenaGallo
Copy link
Contributor

Hi @Igi-ID @tdipisa,

If a map with unadvertised enabled and with group can edit, is opened by a user of the group on Save and Save as panel the Unadvertised checkbox is enable and it is possible to disable it. Is this behaviour correct?

edit.mp4

Open this map with a user in the geosolutions group

@tdipisa
Copy link
Member

tdipisa commented Feb 15, 2024

Hi @Igi-ID @tdipisa,

If a map with unadvertised enabled and with group can edit, is opened by a user of the group on Save and Save as panel the Unadvertised checkbox is enable and it is possible to disable it. Is this behaviour correct?

@ElenaGallo yes, see here for the AC clarification #9583 (comment) in respect of the usual MS overall model.

@tdipisa
Copy link
Member

tdipisa commented Feb 15, 2024

Just one thing I noticed @ElenaGallo @Igi-ID

If the unadvertised checkbox has been previously checked, when you open the map as a user without edit rights (e.g. logout with user with edit rights and then login again with a different user without edit rights), that checkbox is still checked in the Edit properties opening when clicking on the Save as button. The state should be reset, I think:

image

@Igi-ID
Copy link
Contributor Author

Igi-ID commented Feb 21, 2024

Just one thing I noticed @ElenaGallo @Igi-ID

If the unadvertised checkbox has been previously checked, when you open the map as a user without edit rights (e.g. logout with user with edit rights and then login again with a different user without edit rights), that checkbox is still checked in the Edit properties opening when clicking on the Save as button. The state should be reset, I think:

image

Fix provided here #9984

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 participants