Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
3a48e4f6
Commit
3a48e4f6
authored
10 years ago
by
Jared Hancock
Browse files
Options
Downloads
Patches
Plain Diff
Only ticket owners can update ticket details
parent
bda2e422
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/client/view.inc.php
+3
-1
3 additions, 1 deletion
include/client/view.inc.php
tickets.php
+2
-1
2 additions, 1 deletion
tickets.php
with
5 additions
and
2 deletions
include/client/view.inc.php
+
3
−
1
View file @
3a48e4f6
...
...
@@ -26,7 +26,9 @@ if ($thisclient && $thisclient->isGuest()
<h1>
Ticket #
<?php
echo
$ticket
->
getNumber
();
?>
<a
href=
"tickets.php?id=
<?php
echo
$ticket
->
getId
();
?>
"
title=
"Reload"
><span
class=
"Icon refresh"
>
</span></a>
<?php
if
(
$cfg
->
allowClientUpdates
())
{
?>
<?php
if
(
$cfg
->
allowClientUpdates
()
// Only ticket owners can edit the ticket details (and other forms)
&&
$thisclient
->
getId
()
==
$ticket
->
getUserId
())
{
?>
<a
class=
"action-button"
href=
"tickets.php?a=edit&id=
<?php
echo
$ticket
->
getId
();
?>
"
><i
class=
"icon-edit"
></i>
Edit
</a>
<?php
}
?>
...
...
This diff is collapsed.
Click to expand it.
tickets.php
+
2
−
1
View file @
3a48e4f6
...
...
@@ -40,7 +40,8 @@ if($_POST && is_object($ticket) && $ticket->getId()):
$errors
=
array
();
switch
(
strtolower
(
$_POST
[
'a'
])){
case
'edit'
:
if
(
!
$ticket
->
checkUserAccess
(
$thisclient
))
//double check perm again!
if
(
!
$ticket
->
checkUserAccess
(
$thisclient
)
//double check perm again!
||
$thisclient
->
getId
()
!=
$ticket
->
getUserId
())
$errors
[
'err'
]
=
'Access Denied. Possibly invalid ticket ID'
;
elseif
(
!
$cfg
||
!
$cfg
->
allowClientUpdates
())
$errors
[
'err'
]
=
'Access Denied. Client updates are currently disabled'
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment