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
e3120f14
Commit
e3120f14
authored
Oct 24, 2011
by
Jonathon Duerig
Browse files
Add support for image_permissions
parent
c98f79e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/ptopgen.in
View file @
e3120f14
...
...
@@ -779,10 +779,15 @@ if (defined($pid)) {
#
my
$osidquery
=
"
select distinct o.osid, oi.type, o.osname, o.pid, o.OS, o.version, o.description,o.protogeni_export from os_info as o
"
.
"
left join osidtoimageid as oi on o.osid = oi.osid
"
.
"
left join images as i on oi.imageid = i.imageid
"
.
"
where i.global = 1
";
"
left join images as i on oi.imageid = i.imageid
";
if
(
$pid
)
{
$osidquery
.=
"
or i.pid='
$pid
'
";
$osidquery
.=
"
left join image_permissions as p1 on p1.imageid=i.imageid and p1.permission_type='group'
"
.
"
left join groups as g on p1.permission_idx=g.gid_idx
";
}
$osidquery
.=
"
where i.global = 1
";
if
(
$pid
)
{
$osidquery
.=
"
or i.pid='
$pid
'
"
.
"
or (g.pid is not null and g.pid='
$pid
')
";
}
my
$defaultosidquery
=
'
select distinct o.osid, t.type, o.osname, o.pid, o.OS, o.version, o.description, o.protogeni_export
'
.
...
...
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