-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI - use authorization check to determine launch provider access #2804
Conversation
new Promise((resolve, reject) => { | ||
req.clients.zms.getPolicy(param, (err, data) => { | ||
req.clients.zms.getAccessExt(param, (err, data) => { | ||
res.provider[provider.id] = 'not'; | ||
if (err) { | ||
if (err.status !== 404) { | ||
reject(err); | ||
} | ||
} | ||
if ( | ||
data && | ||
data.assertions && | ||
data.assertions.some( | ||
(a) => | ||
a.resource && | ||
a.resource === service && | ||
a.action && | ||
a.action === 'launch' | ||
) | ||
) { | ||
if (data && data.granted) { | ||
res.provider[provider.id] = 'allow'; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data
is returned in form of { granted:true|false }
}, | ||
}); | ||
|
||
Fetchr.registerService({ | ||
name: 'provider', | ||
create(req, resource, params, body, config, callback) { | ||
req.clients.zms.putDomainTemplate( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'provider' create
is now a separately registered fetchr API - previously both create
and read
were registered together. read
is now registered as 'access'
endpoint (above)
25e95f2
to
d1eba4a
Compare
a8b2d83
to
139fa6f
Compare
Signed-off-by: aporss <[email protected]>
139fa6f
to
31a7b87
Compare
Description
UI - use access api to determine if the service provider is enabled or not to support access enabled via Terraform.
Contribution Checklist: