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
80433668
Commit
80433668
authored
May 10, 2011
by
Byron Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 28849: Block users from CCing other users if they do not have editbugs privs
r=LpSolit, a=LpSolit
parent
12a41578
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
3 deletions
+21
-3
Bug.pm
Bugzilla/Bug.pm
+4
-0
edit.html.tmpl
template/en/default/bug/edit.html.tmpl
+13
-3
user-error.html.tmpl
template/en/default/global/user-error.html.tmpl
+4
-0
No files found.
Bugzilla/Bug.pm
View file @
80433668
...
...
@@ -2658,6 +2658,10 @@ sub remove_cc {
my
(
$self
,
$user_or_name
)
=
@_
;
my
$user
=
ref
$user_or_name
?
$user_or_name
:
Bugzilla::
User
->
check
(
$user_or_name
);
my
$currentUser
=
Bugzilla
->
user
;
if
(
!
$self
->
user
->
{
'canedit'
}
&&
$user
->
id
!=
$currentUser
->
id
)
{
ThrowUserError
(
'cc_remove_denied'
);
}
my
$cc_users
=
$self
->
cc_users
;
@$cc_users
=
grep
{
$_
->
id
!=
$user
->
id
}
@$cc_users
;
}
...
...
template/en/default/bug/edit.html.tmpl
View file @
80433668
...
...
@@ -830,16 +830,26 @@
</div>
[% END %]
[% IF bug.cc %]
<select id="cc" name="cc" multiple="multiple" size="5">
<select id="cc" multiple="multiple" size="5"
[% IF bug.user.canedit %]name="cc"[% END %]>
[% FOREACH c = bug.cc %]
<option value="[% c FILTER email FILTER html %]">
[% c FILTER email FILTER html %]</option>
[% END %]
</select>
[% IF user.id %]
[% IF user.id && !bug.user.canedit %]
<input type="hidden" name="cc" value="[% user.login FILTER email FILTER html %]">
[% END %]
[% IF user.id AND (bug.user.canedit OR bug.cc.contains(user.login)) %]
<br>
<input type="checkbox" id="removecc" name="removecc">
[%%]<label for="removecc">Remove selected CCs</label>
<label for="removecc">
[% IF bug.user.canedit %]
Remove selected CCs
[% ELSE %]
Remove me from the CC list
[% END %]
</label>
<br>
[% END %]
[% END %]
...
...
template/en/default/global/user-error.html.tmpl
View file @
80433668
...
...
@@ -280,6 +280,10 @@
'query.html#list' => "$terms.Bug lists"} %]
You may not search, or create saved searches, without any search terms.
[% ELSIF error == "cc_remove_denied" %]
[% title = "Change Denied" %]
You do not have permission to remove other people from the CC list.
[% ELSIF error == "chart_too_large" %]
[% title = "Chart Too Large" %]
Sorry, but 2000 x 2000 is the maximum size for a chart.
...
...
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