Clean up whitelisted permission addition / logging.
This commit is contained in:
parent
8b311c706c
commit
66ea78de65
1 changed files with 10 additions and 4 deletions
|
@ -350,12 +350,18 @@ export default class AppTile extends React.Component {
|
||||||
requestedCapabilities = requestedCapabilities || [];
|
requestedCapabilities = requestedCapabilities || [];
|
||||||
|
|
||||||
// Allow whitelisted capabilities
|
// Allow whitelisted capabilities
|
||||||
const requestedWhitelistCapabilies =
|
let requestedWhitelistCapabilies = [];
|
||||||
requestedCapabilities.filter(function(e) {
|
|
||||||
|
if (this.props.whitelistCapabilities && this.props.whitelistCapabilities.length > 0) {
|
||||||
|
requestedWhitelistCapabilies = requestedCapabilities.filter(function(e) {
|
||||||
return this.indexOf(e)>=0;
|
return this.indexOf(e)>=0;
|
||||||
}, this.props.whitelistCapabilities);
|
}, this.props.whitelistCapabilities);
|
||||||
console.warn(`Widget ${this.props.id} allowing requested, whitelisted properties:`,
|
|
||||||
requestedWhitelistCapabilies);
|
if (requestedWhitelistCapabilies.length > 0 ) {
|
||||||
|
console.warn(`Widget ${this.props.id} allowing requested, whitelisted properties:`,
|
||||||
|
requestedWhitelistCapabilies);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TODO -- Add UI to warn about and optionally allow requested capabilities
|
// TODO -- Add UI to warn about and optionally allow requested capabilities
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue