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
04e9a1ce
Commit
04e9a1ce
authored
Apr 19, 2000
by
donm%bluemartini.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug 25010 add ability to easily edit groups
parent
6dff94ab
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
48 deletions
+39
-48
CGI.pl
CGI.pl
+3
-0
bug_form.pl
bug_form.pl
+1
-1
editgroups.cgi
editgroups.cgi
+0
-0
enter_bug.cgi
enter_bug.cgi
+35
-41
post_bug.cgi
post_bug.cgi
+0
-6
No files found.
CGI.pl
View file @
04e9a1ce
...
...
@@ -946,6 +946,9 @@ sub GetCommandMenu {
if
(
UserInGroup
(
"editkeywords"
))
{
$html
.=
", <a href=editkeywords.cgi>keywords</a>"
;
}
if
(
UserInGroup
(
"creategroups"
)
&&
Param
(
"usebuggroups"
))
{
$html
.=
", <a href=editgroups.cgi>groups</a>"
;
}
$html
.=
" | <NOBR><a href=relogin.cgi>Log out</a> $::COOKIE{'Bugzilla_login'}</NOBR>"
;
}
else
{
$html
.=
...
...
bug_form.pl
View file @
04e9a1ce
...
...
@@ -355,7 +355,7 @@ print "
<TEXTAREA WRAP=HARD NAME=comment ROWS=5 COLS=80></TEXTAREA><BR>"
;
if
(
$::usergroupset
ne
'0'
)
{
if
(
$::usergroupset
ne
'0'
and
Param
(
'usebuggroups'
)
)
{
SendSQL
(
"select bit, description, (bit & $bug{'groupset'} != 0) from groups where bit & $::usergroupset != 0 and isbuggroup != 0 order by bit"
);
while
(
MoreSQLData
())
{
my
(
$bit
,
$description
,
$ison
)
=
(
FetchSQLData
());
...
...
editgroups.cgi
0 → 100755
View file @
04e9a1ce
This diff is collapsed.
Click to expand it.
enter_bug.cgi
View file @
04e9a1ce
...
...
@@ -250,15 +250,17 @@ PutHeader ("Enter Bug","Enter Bug","This page lets you enter a new bug into Bugz
# Modified, -JMR, 2/24,00
# If the usebuggroupsentry parameter is set, we need to check and make sure
# that the user has permission to enter a bug against this product.
if
(
Param
(
"usebuggroupsentry"
))
{
if
(
!
UserInGroup
(
$product
))
{
print
"<H1>Permission denied.</H1>\n"
;
print
"Sorry; you do not have the permissions necessary to enter\n"
;
print
"a bug against this product.\n"
;
print
"<P>\n"
;
PutFooter
();
exit
;
}
# Modified, -DDM, 3/11/00
# added GroupExists check so we don't choke on a groupless product
if
(
Param
(
"usebuggroupsentry"
)
&&
GroupExists
(
$product
)
&&
!
UserInGroup
(
$product
))
{
print
"<H1>Permission denied.</H1>\n"
;
print
"Sorry; you do not have the permissions necessary to enter\n"
;
print
"a bug against this product.\n"
;
print
"<P>\n"
;
PutFooter
();
exit
;
}
# Modified, -JMR, 2/18/00
...
...
@@ -271,14 +273,17 @@ if(Param("usebuggroupsentry")) {
# the database, (2) insert the select box in the giant print statements below,
# and (3) update post_bug.cgi to process the additional input field.
# Modified, -DDM, 3/11/00
# Only need the bit here, and not the description. Description is gotten
# when the select boxes for all the groups this user has access to are read
# in later on.
# First we get the bit and description for the group.
my
$group_bit
=
0
;
my
$group_desc
;
if
(
Param
(
"usebuggroups"
)
&&
GroupExists
(
$product
))
{
SendSQL
(
"select bit
, description
from groups "
.
SendSQL
(
"select bit from groups "
.
"where name = "
.
SqlQuote
(
$product
)
.
" "
.
"and isbuggroup != 0"
);
(
$group_bit
,
$group_desc
)
=
FetchSQLData
();
(
$group_bit
)
=
FetchSQLData
();
}
print
"
...
...
@@ -388,33 +393,6 @@ print "
value_quote
(
formvalue
(
'comment'
))
.
"</TEXTAREA><BR></td>
</tr>"
;
# In between the Description field and the Submit buttons, we'll put in the
# select box for the bug group, if necessary.
# Rather than waste time with another Param check and another database access,
# $group_bit will only have a non-zero value if we're using bug groups and have
# one for this product, so I'll check on that instead here. -JMR, 2/18/00
if
(
$group_bit
)
{
# In addition, we need to handle the possibility that we're coming from
# a bookmark template. We'll simply check if we've got a parameter called
# groupset passed with a value other than the current bit. If so, then we're
# coming from a template, and we don't have group_bit set, so turn it off.
my
$check0
=
(
formvalue
(
"groupset"
,
$group_bit
)
==
$group_bit
)
?
""
:
" SELECTED"
;
my
$check1
=
(
$check0
eq
""
)
?
" SELECTED"
:
""
;
print
"
<tr>
<td align=right><B>Access:</td>
<td colspan=5>
<select name=\"groupset\">
<option value=0$check0>
People not in the \"$group_desc\" group can see this bug
</option>
<option value=$group_bit$check1>
Only people in the \"$group_desc\" group can see this bug
</option>
</select>
</td>
</tr>"
}
print
"
<tr>
...
...
@@ -424,15 +402,31 @@ print "
if
(
$::usergroupset
ne
'0'
)
{
SendSQL
(
"SELECT bit, description FROM groups "
.
"WHERE bit & $::usergroupset != 0 "
.
" AND isbuggroup != 0 ORDER BY
bit
"
);
" AND isbuggroup != 0 ORDER BY
description
"
);
while
(
MoreSQLData
())
{
my
(
$bit
,
$description
)
=
(
FetchSQLData
());
# Rather than waste time with another Param check and another database
# access, $group_bit will only have a non-zero value if we're using
# bug groups and have one for this product, so I'll check on that
# instead here. -JMR, 2/18/00
# Moved this check to this location to fix conflict with existing
# select-box patch. Also, if $group_bit is 0, it won't match the
# current group, either, so I'll compare it to the current bit
# instead of checking for non-zero. -DDM, 3/11/00
my
$check
=
0
;
# default selection
if
(
$group_bit
==
$bit
)
{
# In addition, we need to handle the possibility that we're coming
# from a bookmark template. We'll simply check if we've got a
# parameter called bit-# passed. If so, then we're coming from a
# template, and we'll use the template value.
$check
=
formvalue
(
"bit-$bit"
,
"1"
);
}
print
BuildPulldown
(
"bit-$bit"
,
[[
"0"
,
"People not in the \"$description\" group can see this bug"
],
[
"1"
,
"Only people in the \"$description\" group can see this bug"
]],
0
);
$check
);
print
"<BR>\n"
;
}
}
...
...
post_bug.cgi
View file @
04e9a1ce
...
...
@@ -121,12 +121,6 @@ if (Param("useqacontact")) {
}
}
# If we're using bug groups, we need to include the groupset in the list of
# fields. -JMR, 2/18/00
if
(
Param
(
"usebuggroups"
))
{
push
(
@bug_fields
,
"groupset"
);
}
if
(
exists
$::FORM
{
'bug_status'
})
{
if
(
!
UserInGroup
(
"canedit"
)
&&
!
UserInGroup
(
"canconfirm"
))
{
delete
$::FORM
{
'bug_status'
};
...
...
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