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
34eec4bd
Commit
34eec4bd
authored
Oct 15, 2015
by
Leigh B Stoller
Browse files
Fix profile permission check.
parent
5295bf87
Changes
1
Hide whitespace changes
Inline
Side-by-side
www/aptui/instantiate.ajax
View file @
34eec4bd
...
@@ -627,10 +627,12 @@ function CheckStep2()
...
@@ -627,10 +627,12 @@ function CheckStep2()
if
(
!
$profile
)
{
if
(
!
$profile
)
{
$errors
[
"error"
]
=
"No such profile exists"
;
$errors
[
"error"
]
=
"No such profile exists"
;
}
}
elseif
(
!
(
$profile
->
ispublic
()
||
#
(
isset
(
$this_user
)
&&
$profile
->
CanInstantiate
(
$this_user
)))){
# Our permission model is that anyone who knows the uuid can
$errors
[
"error"
]
=
"No permission to use profile"
;
# instantiate the profile, and either they provided the URL
}
# in the URL or its a profile uuid they got from the instantiate
# page via their permissions. So no checks here.
#
}
}
if
(
!
$this_user
)
{
if
(
!
$this_user
)
{
#
#
...
...
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