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
ee4d3250
Commit
ee4d3250
authored
Sep 16, 2000
by
cyeh%bluemartini.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
front end fix for 31456: Editing a superuser clears their access flags
patch by jmrobin@tgix.com
parent
39166470
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
20 deletions
+30
-20
editusers.cgi
editusers.cgi
+26
-20
globals.pl
globals.pl
+4
-0
No files found.
editusers.cgi
View file @
ee4d3250
...
...
@@ -746,27 +746,33 @@ if ($action eq 'update') {
SendSQL
(
"SELECT groupset FROM profiles WHERE login_name="
.
SqlQuote
(
$userold
));
$groupsetold
=
FetchOneColumn
();
SendSQL
(
"UPDATE profiles
SET groupset =
# Updated, 5/7/00, Joe Robins
# We don't want to change the groupset of a superuser.
if
(
$groupsetold
eq
$::superusergroupset
)
{
print
"Cannot change permissions of superuser.\n"
;
}
else
{
SendSQL
(
"UPDATE profiles
SET groupset =
groupset - (groupset & $opblessgroupset) + $groupset
WHERE login_name="
.
SqlQuote
(
$userold
));
# I'm paranoid that someone who I give the ability to bless people
# will start misusing it. Let's log who blesses who (even though
# nothing actually uses this log right now).
my
$fieldid
=
GetFieldID
(
"groupset"
);
SendSQL
(
"SELECT userid, groupset FROM profiles WHERE login_name="
.
SqlQuote
(
$userold
));
my
$u
;
(
$u
,
$groupset
)
=
(
FetchSQLData
());
if
(
$groupset
ne
$groupsetold
)
{
SendSQL
(
"INSERT INTO profiles_activity "
.
"(userid,who,profiles_when,fieldid,oldvalue,newvalue) "
.
"VALUES "
.
"($u, $::userid, now(), $fieldid, "
.
" $groupsetold, $groupset)"
);
}
print
"Updated permissions.\n"
;
WHERE login_name="
.
SqlQuote
(
$userold
));
# I'm paranoid that someone who I give the ability to bless people
# will start misusing it. Let's log who blesses who (even though
# nothing actually uses this log right now).
my
$fieldid
=
GetFieldID
(
"groupset"
);
SendSQL
(
"SELECT userid, groupset FROM profiles WHERE login_name="
.
SqlQuote
(
$userold
));
my
$u
;
(
$u
,
$groupset
)
=
(
FetchSQLData
());
if
(
$groupset
ne
$groupsetold
)
{
SendSQL
(
"INSERT INTO profiles_activity "
.
"(userid,who,profiles_when,fieldid,oldvalue,newvalue) "
.
"VALUES "
.
"($u, $::userid, now(), $fieldid, "
.
" $groupsetold, $groupset)"
);
}
print
"Updated permissions.\n"
;
}
}
if
(
$editall
&&
$blessgroupset
ne
$blessgroupsetold
)
{
...
...
globals.pl
View file @
ee4d3250
...
...
@@ -77,6 +77,10 @@ $::defaultqueryname = "(Default query)";
$::unconfirmedstate
=
"UNCONFIRMED"
;
$::dbwritesallowed
=
1
;
# Adding a global variable for the value of the superuser groupset.
# Joe Robins, 7/5/00
$::superusergroupset
=
"9223372036854775807"
;
sub
ConnectToDatabase
{
my
(
$useshadow
)
=
(
@_
);
if
(
!
defined
$::db
)
{
...
...
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