Skip to content
GitLab
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
d2414cce
Commit
d2414cce
authored
Feb 27, 2017
by
Leigh B Stoller
Browse files
Minor tweak so that only admins/studs see image deletion part of
profile deletion.
parent
71cbe78e
Changes
1
Hide whitespace changes
Inline
Side-by-side
apt/manage_profile.in
View file @
d2414cce
...
...
@@ -754,11 +754,12 @@ sub escapeshellarg($)
#
sub
DeleteProfile
()
{
my
$optlist
=
"
akfn
";
my
$optlist
=
"
akfn
m
";
my
$all
=
0
;
my
$keepimages
=
0
;
my
$force
=
0
;
my
$impotent
=
1
;
my
$impotent
=
0
;
my
$mereuser
=
0
;
my
$errmsg
;
my
%images
;
my
@versions
;
...
...
@@ -779,6 +780,9 @@ sub DeleteProfile()
if
(
defined
(
$options
{"
n
"}))
{
$impotent
=
1
;
}
if
(
defined
(
$options
{"
m
"}))
{
$mereuser
=
1
;
}
usage
()
if
(
!
@ARGV
);
...
...
@@ -794,6 +798,9 @@ sub DeleteProfile()
$errmsg
=
"
Not allowed to delete this profile (version)
";
goto
uerror
;
}
# For now, mere users do not see new image deletion stuff.
$keepimages
=
1
if
(
$mereuser
);
#
# Get all the image references for this profile. If we are deleting all
# of the version, we need all image references across all versions.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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