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

Count user defined js , adapt message when js exception #4776

Merged
merged 3 commits into from
Sep 24, 2024

Conversation

nworr
Copy link
Contributor

@nworr nworr commented Sep 20, 2024

When user is session is kind of admin , and if some user defined script are loaded, the javascript exception catcher add info about user scripts.

Screenshot 2024-09-23 at 12-26-06 Montpellier - Transports - Demo - Lizmap

edit : updated screenshot

it adds a new parameter in the URL no_user_defined_js=1

Funded by 3Liz

Copy link
Member

@Gustry Gustry left a comment

Choose a reason for hiding this comment

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

Very nice addition !

I got a few ideas, I will have a look after if you want :

@Gustry Gustry added the javascript Pull requests that update Javascript code label Sep 20, 2024
@nworr nworr marked this pull request as ready for review September 23, 2024 14:07
Copy link
Member

@Gustry Gustry left a comment

Choose a reason for hiding this comment

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

Looks great !

@nworr nworr merged commit 721ce41 into 3liz:master Sep 24, 2024
13 checks passed
@3liz-bot
Copy link
Contributor

The backport to release_3_7 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply 71037ddb6... check user defined script and adapt message on js exception
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config advice.mergeConflict false"

stdout
Auto-merging lizmap/modules/view/controllers/lizMap.classic.php
[backport-4776-to-release_3_7 9f6d6df87] count user defined js and check if user is admin
 Author: Raphaël Martin <[email protected]>
 Date: Fri Sep 20 13:54:39 2024 +0200
 1 file changed, 7 insertions(+), 1 deletion(-)
Auto-merging assets/src/legacy/map.js
CONFLICT (content): Merge conflict in assets/src/legacy/map.js
Auto-merging lizmap/modules/view/locales/en_US/dictionnary.UTF-8.properties

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release_3_7 release_3_7
# Navigate to the new working tree
cd .worktrees/backport-release_3_7
# Create a new branch
git switch --create backport-4776-to-release_3_7
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick ec7587f83391d815ae00bfc55709a6aecbaa4fa0,71037ddb6c824475181af59ecfbbbb39b5c881cf,ff494e8e029f264cb18010b315ec4ef8ec8db94f
# Push it to GitHub
git push --set-upstream origin backport-4776-to-release_3_7
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release_3_7

Then, create a pull request where the base branch is release_3_7 and the compare/head branch is backport-4776-to-release_3_7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants