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

Map (created with context) crashes if the export plugin is set up to be hidden to certain groups and the user is not logged in #10262

Closed
1 task done
mahmoudadel54 opened this issue Apr 26, 2024 · 0 comments · Fixed by #10270 or #10298

Comments

@mahmoudadel54
Copy link
Contributor

mahmoudadel54 commented Apr 26, 2024

Description

If a non-logged in user accedes MapStore as a guest, and opens a Map resource created with a context and this context has some settings to hide the export functionality for users that are not admin then the map crashes, on the console the error is the following

How to reproduce

  • Create a context
  • Add export map plugin and add inside cfg: "disablePluginIf": "{state('userrole') != 'ADMIN'}"
  • Save the context
  • logout and try to open this context

Expected Result
The app should work as normal without crash

Current Result
The app crashes

  • Not browser related
Browser info (use this site: https://www.whatsmybrowser.org/ for non expert users)
Browser Affected Version
Internet Explorer
Edge
Chrome
Firefox
Safari

Other useful information

@mahmoudadel54 mahmoudadel54 self-assigned this Apr 26, 2024
@mahmoudadel54 mahmoudadel54 added this to the 2024.01.01 milestone Apr 26, 2024
mahmoudadel54 added a commit to mahmoudadel54/MapStore2 that referenced this issue May 2, 2024
…rt plugin is set up to be hidden to certain groups and the user is not logged in

Description:
- edit parseExpression method in PluginUtils to handle the chanining within cfg expressions
mahmoudadel54 added a commit to mahmoudadel54/MapStore2 that referenced this issue May 2, 2024
…rt plugin is set up to be hidden to certain groups and the user is not logged in

Description:
- add unit test to test parseExpression change
MV88 pushed a commit that referenced this issue May 2, 2024
…t up to be hidden to certain groups and the user is not logged in (#10270)

* #10262: Map (created with context) crashes if the export plugin is set up to be hidden to certain groups and the user is not logged in
Description:
- edit parseExpression method in PluginUtils to handle the chanining within cfg expressions

* #10262: Map (created with context) crashes if the export plugin is set up to be hidden to certain groups and the user is not logged in
Description:
- add unit test to test parseExpression change
@MV88 MV88 added the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label May 2, 2024
@ElenaGallo ElenaGallo self-assigned this May 3, 2024
mahmoudadel54 added a commit to mahmoudadel54/MapStore2 that referenced this issue May 9, 2024
…rt plugin is set up to be hidden to certain groups and the user is not logged in (geosolutions-it#10270)

* geosolutions-it#10262: Map (created with context) crashes if the export plugin is set up to be hidden to certain groups and the user is not logged in
Description:
- edit parseExpression method in PluginUtils to handle the chanining within cfg expressions

* geosolutions-it#10262: Map (created with context) crashes if the export plugin is set up to be hidden to certain groups and the user is not logged in
Description:
- add unit test to test parseExpression change
tdipisa pushed a commit that referenced this issue May 10, 2024
…t up to be hidden to certain groups and the user is not logged in (#10270) (#10298)

* #10262: Map (created with context) crashes if the export plugin is set up to be hidden to certain groups and the user is not logged in
Description:
- edit parseExpression method in PluginUtils to handle the chanining within cfg expressions

* #10262: Map (created with context) crashes if the export plugin is set up to be hidden to certain groups and the user is not logged in
Description:
- add unit test to test parseExpression change
@tdipisa tdipisa removed the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment