Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
3f150979
Commit
3f150979
authored
Jan 18, 2002
by
Leigh B. Stoller
Browse files
Add perm function for webdb.
parent
4848f41e
Changes
1
Hide whitespace changes
Inline
Side-by-side
www/dbdefs.php3.in
View file @
3f150979
...
...
@@ -22,6 +22,15 @@ $TBDB_OSID_OSIDLEN = 30;
$TBDB_OSID_VERSLEN
=
12
;
$TBDB_IMAGEID_IMAGEIDLEN
=
30
;
#
# User status field.
#
$TBDB_USERSTATUS_ACTIVE
=
"active"
;
$TBDB_USERSTATUS_NEWUSER
=
"newuser"
;
$TBDB_USERSTATUS_UNAPPROVED
=
"unapproved"
;
$TBDB_USERSTATUS_UNVERIFIED
=
"unverified"
;
$TBDB_USERSTATUS_FROZEN
=
"frozen"
;
#
# Trust. Define the trust level as an increasing value. Then define a
# function to return whether the given trust is high enough.
...
...
@@ -955,6 +964,14 @@ function TBUserPCs($uid)
return
mysql_num_rows
(
$query_result
);
}
function
TBWebdbAllowed
(
$uid
)
{
$query_result
=
DBQueryFatal
(
"select dbedit from users "
.
"WHERE uid='
$uid
' and dbedit=1"
);
return
mysql_num_rows
(
$query_result
);
}
#
# DB Interface.
#
...
...
Write
Preview
Supports
Markdown
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