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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
2133713f
Commit
2133713f
authored
May 30, 2001
by
justdave%syndicomm.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug 65290: can now edit user-regexps for system groups
parent
83c52d39
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
9 deletions
+26
-9
editgroups.cgi
editgroups.cgi
+26
-9
No files found.
editgroups.cgi
View file @
2133713f
...
@@ -133,7 +133,6 @@ unless ($action) {
...
@@ -133,7 +133,6 @@ unless ($action) {
print
"</table>\n"
;
print
"</table>\n"
;
print
"<input type=hidden name=\"action\" value=\"update\">"
;
print
"<input type=hidden name=\"action\" value=\"update\">"
;
print
"<input type=submit value=\"Submit changes\">\n"
;
print
"<input type=submit value=\"Submit changes\">\n"
;
print
"</form>\n"
;
print
"<p>"
;
print
"<p>"
;
print
"<b>Name</b> is what is used with the UserInGroup() function in any
print
"<b>Name</b> is what is used with the UserInGroup() function in any
...
@@ -147,31 +146,41 @@ to others in the same group.<p>";
...
@@ -147,31 +146,41 @@ to others in the same group.<p>";
grant membership to this group to anyone creating a new account with an
grant membership to this group to anyone creating a new account with an
email address that matches this regular expression.<p>"
;
email address that matches this regular expression.<p>"
;
print
"In addition, the following groups that determine user privileges
print
"In addition, the following groups that determine user privileges
exist. You can not edit these, but you need to know they are here, because
exist. You can only edit the User rexexp on these groups. You should also take
you can't duplicate the Names of any of them in your user groups either.<p>"
;
care not to duplicate the Names of any of them in your user groups.<p>"
;
print
"Also please note that both of the Submit Changes buttons on this page
will submit the changes in both tables. There are two buttons simply for the
sake of convience.<p>"
;
print
"<table border=1>\n"
;
print
"<table border=1>\n"
;
print
"<tr>"
;
print
"<tr>"
;
print
"<th>Bit</th>"
;
print
"<th>Bit</th>"
;
print
"<th>Name</th>"
;
print
"<th>Name</th>"
;
print
"<th>Description</th>"
;
print
"<th>Description</th>"
;
print
"<th>User RegExp</th>"
;
print
"</tr>\n"
;
print
"</tr>\n"
;
SendSQL
(
"SELECT bit,name,description "
.
SendSQL
(
"SELECT bit,name,description
,userregexp
"
.
"FROM groups "
.
"FROM groups "
.
"WHERE isbuggroup = 0 "
.
"WHERE isbuggroup = 0 "
.
"ORDER BY bit"
);
"ORDER BY bit"
);
while
(
MoreSQLData
())
{
while
(
MoreSQLData
())
{
my
(
$bit
,
$name
,
$desc
)
=
FetchSQLData
();
my
(
$bit
,
$name
,
$desc
,
$regexp
)
=
FetchSQLData
();
print
"<tr>\n"
;
print
"<tr>\n"
;
print
"<td>$bit</td>\n"
;
print
"<td>$bit</td>\n"
;
print
"<td>$name</td>\n"
;
print
"<td>$name</td>\n"
;
print
"<input type=hidden name=\"name-$bit\" value=\"$name\">\n"
;
print
"<input type=hidden name=\"oldname-$bit\" value=\"$name\">\n"
;
print
"<td>$desc</td>\n"
;
print
"<td>$desc</td>\n"
;
print
"<td><input type=text size=30 name=\"regexp-$bit\" value=\"$regexp\"></td>\n"
;
print
"<input type=hidden name=\"oldregexp-$bit\" value=\"$regexp\">\n"
;
print
"</tr>\n"
;
print
"</tr>\n"
;
}
}
print
"</table><p>\n"
;
print
"</table><p>\n"
;
print
"<input type=submit value=\"Submit changes\">\n"
;
print
"</form>\n"
;
PutFooter
();
PutFooter
();
exit
;
exit
;
...
@@ -523,10 +532,18 @@ if ($action eq 'update') {
...
@@ -523,10 +532,18 @@ if ($action eq 'update') {
SendSQL
(
"SELECT name FROM groups WHERE name="
.
SendSQL
(
"SELECT name FROM groups WHERE name="
.
SqlQuote
(
$::FORM
{
"name-$v"
}));
SqlQuote
(
$::FORM
{
"name-$v"
}));
if
(
!
FetchOneColumn
())
{
if
(
!
FetchOneColumn
())
{
SendSQL
(
"UPDATE groups SET name="
.
SendSQL
(
"SELECT name FROM groups WHERE name="
.
SqlQuote
(
$::FORM
{
"name-$v"
})
.
SqlQuote
(
$::FORM
{
"oldname-$v"
})
.
" WHERE bit="
.
SqlQuote
(
$v
));
" && isbuggroup = 0"
);
print
"Group $v name updated.<br>\n"
;
if
(
FetchOneColumn
())
{
ShowError
(
"You cannot update the name of a "
.
"system group. Skipping $v"
);
}
else
{
SendSQL
(
"UPDATE groups SET name="
.
SqlQuote
(
$::FORM
{
"name-$v"
})
.
" WHERE bit="
.
SqlQuote
(
$v
));
print
"Group $v name updated.<br>\n"
;
}
}
else
{
}
else
{
ShowError
(
"Duplicate name '"
.
$::FORM
{
"name-$v"
}
.
ShowError
(
"Duplicate name '"
.
$::FORM
{
"name-$v"
}
.
"' specified for group $v.<BR>"
.
"' specified for group $v.<BR>"
.
...
...
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