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

Fix scope - only tickets are affected #267

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed

- Redirect users without ticket rights after escalation.
- Fixed the "delete button" feature : only affects tickets and not the changes / problems

## [2.9.10] - 2024-11-27

Expand Down
4 changes: 1 addition & 3 deletions js/remove_btn.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,7 @@ function handleEvent() {

$(document).ready(function() {
// only in ticket form
if (location.pathname.indexOf('ticket.form.php') > 0
|| location.pathname.indexOf('problem.form.php') > 0
|| location.pathname.indexOf('change.form.php') > 0) {
if (location.pathname.indexOf('ticket.form.php')) {
$(document).on('glpi.tab.loaded', function() {
let buttons_to_delete = {
Group: {
Expand Down
4 changes: 1 addition & 3 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ function plugin_init_escalade()

// on ticket page (in edition)
if (
(strpos($_SERVER['REQUEST_URI'] ?? '', "ticket.form.php") !== false
|| strpos($_SERVER['REQUEST_URI'] ?? '', "problem.form.php") !== false
|| strpos($_SERVER['REQUEST_URI'] ?? '', "change.form.php") !== false) && isset($_GET['id'])
(strpos($_SERVER['REQUEST_URI'] ?? '', "ticket.form.php") !== false) && isset($_GET['id'])
) {
if (
!$escalade_config['remove_delete_requester_user_btn']
Expand Down