fix(xen-api/call): allow *.get_all_records in read only
This commit is contained in:
parent
5cca5d69af
commit
b32dc0e450
@ -1,3 +1,6 @@
|
||||
const RE = /^[^.]+\.get_/
|
||||
|
||||
export default (method, args) => args.length === 1 && typeof args[0] === 'string' && RE.test(method)
|
||||
export default function isReadOnlyCall(method, args) {
|
||||
const n = args.length
|
||||
return (n === 0 || (n === 1 && typeof args[0] === 'string')) && RE.test(method)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user