Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
e3120f14
Commit
e3120f14
authored
Oct 24, 2011
by
Jonathon Duerig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for image_permissions
parent
c98f79e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
tbsetup/ptopgen.in
tbsetup/ptopgen.in
+8
-3
No files found.
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
Markdown
is supported
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