Commit b20a89af authored by Leigh B. Stoller's avatar Leigh B. Stoller

Kill off more Create OSID menu options for non-admin types.

parent 38931535
...@@ -985,8 +985,10 @@ if (! isset($node)) { ...@@ -985,8 +985,10 @@ if (! isset($node)) {
} }
WRITESUBMENUBUTTON("Create a new Image Descriptor", WRITESUBMENUBUTTON("Create a new Image Descriptor",
"newimageid_ez.php3"); "newimageid_ez.php3");
WRITESUBMENUBUTTON("Create a new OS Descriptor", if ($isadmin) {
"newosid_form.php3"); WRITESUBMENUBUTTON("Create a new OS Descriptor",
"newosid_form.php3");
}
WRITESUBMENUBUTTON("Image Descriptor list", WRITESUBMENUBUTTON("Image Descriptor list",
"showimageid_list.php3"); "showimageid_list.php3");
WRITESUBMENUBUTTON("OS Descriptor list", WRITESUBMENUBUTTON("OS Descriptor list",
......
...@@ -17,6 +17,7 @@ PAGEHEADER("Image Descriptor"); ...@@ -17,6 +17,7 @@ PAGEHEADER("Image Descriptor");
# #
$uid = GETLOGIN(); $uid = GETLOGIN();
LOGGEDINORDIE($uid); LOGGEDINORDIE($uid);
$isadmin = ISADMIN($uid);
# #
# Verify form arguments. # Verify form arguments.
...@@ -46,8 +47,10 @@ WRITESUBMENUBUTTON("Delete this Image Descriptor", ...@@ -46,8 +47,10 @@ WRITESUBMENUBUTTON("Delete this Image Descriptor",
"deleteimageid.php3?imageid=$fooid"); "deleteimageid.php3?imageid=$fooid");
WRITESUBMENUBUTTON("Create a new Image Descriptor", WRITESUBMENUBUTTON("Create a new Image Descriptor",
"newimageid_ez.php3"); "newimageid_ez.php3");
WRITESUBMENUBUTTON("Create a new OS Descriptor", if ($isadmin) {
"newosid_form.php3"); WRITESUBMENUBUTTON("Create a new OS Descriptor",
"newosid_form.php3");
}
WRITESUBMENUBUTTON("Image Descriptor list", WRITESUBMENUBUTTON("Image Descriptor list",
"showimageid_list.php3"); "showimageid_list.php3");
WRITESUBMENUBUTTON("OS Descriptor list", WRITESUBMENUBUTTON("OS Descriptor list",
......
...@@ -17,6 +17,7 @@ PAGEHEADER("OS Descriptor Information"); ...@@ -17,6 +17,7 @@ PAGEHEADER("OS Descriptor Information");
# #
$uid = GETLOGIN(); $uid = GETLOGIN();
LOGGEDINORDIE($uid); LOGGEDINORDIE($uid);
$isadmin = ISADMIN($uid);
# #
# Verify form arguments. # Verify form arguments.
...@@ -41,8 +42,10 @@ SUBPAGESTART(); ...@@ -41,8 +42,10 @@ SUBPAGESTART();
SUBMENUSTART("More Options"); SUBMENUSTART("More Options");
WRITESUBMENUBUTTON("Delete this OS Descriptor", WRITESUBMENUBUTTON("Delete this OS Descriptor",
"deleteosid.php3?osid=$osid"); "deleteosid.php3?osid=$osid");
WRITESUBMENUBUTTON("Create a new OS Descriptor", if ($isadmin) {
"newosid_form.php3"); WRITESUBMENUBUTTON("Create a new OS Descriptor",
"newosid_form.php3");
}
WRITESUBMENUBUTTON("Create a new Image Descriptor", WRITESUBMENUBUTTON("Create a new Image Descriptor",
"newimageid_ez.php3"); "newimageid_ez.php3");
WRITESUBMENUBUTTON("OS Descriptor list", WRITESUBMENUBUTTON("OS Descriptor list",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment