Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
8ca5f9dd
Commit
8ca5f9dd
authored
Jan 28, 2005
by
travis%sedsystems.ca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 218771 : The error message should be more accurate on who can change fields
Patch by Frederic Buclin <LpSolit@gmail.com> r=myk a=myk
parent
a2a9bf47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
26 deletions
+32
-26
process_bug.cgi
process_bug.cgi
+32
-26
No files found.
process_bug.cgi
View file @
8ca5f9dd
...
...
@@ -439,37 +439,43 @@ sub CheckCanChangeField {
return
1
;
}
# The reporter is a more complicated case...
if
(
$reporterid
==
$whoid
)
{
# At this point, the user is either the reporter or an
# unprivileged user. We first check for fields the reporter
# is not allowed to change.
# The reporter may not:
# - reassign bugs, unless the bugs are assigned to him;
# in that case we will have already returned 1 above
# when checking for the owner of the bug.
if
(
$field
eq
"assigned_to"
)
{
$PrivilegesRequired
=
2
;
return
0
;
}
# - change the QA contact
if
(
$field
eq
"qa_contact"
)
{
$PrivilegesRequired
=
2
;
return
0
;
}
# - change the target milestone
if
(
$field
eq
"target_milestone"
)
{
$PrivilegesRequired
=
2
;
return
0
;
}
# - change the priority (unless he could have set it originally)
if
(
$field
eq
"priority"
&&
!
Param
(
'letsubmitterchoosepriority'
))
{
$PrivilegesRequired
=
2
;
return
0
;
}
# The reporter may not:
# - reassign bugs, unless the bugs are assigned to him;
# in that case we will have already returned 1 above
# when checking for the owner of the bug.
if
(
$field
eq
"assigned_to"
)
{
return
0
;
}
# - change the QA contact
if
(
$field
eq
"qa_contact"
)
{
return
0
;
}
# - change the target milestone
if
(
$field
eq
"target_milestone"
)
{
return
0
;
}
# - change the priority (unless he could have set it originally)
if
(
$field
eq
"priority"
&&
!
Param
(
'letsubmitterchoosepriority'
))
{
return
0
;
}
# Allow the reporter to change anything else.
# The reporter is allowed to change anything else.
if
(
$reporterid
==
$whoid
)
{
return
1
;
}
# If we haven't returned by this point, then the user doesn't
have the
# necessary permissions to change this field.
# If we haven't returned by this point, then the user doesn't
#
have the
necessary permissions to change this field.
$PrivilegesRequired
=
1
;
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment