mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 12:17:08 +00:00
Add function argument defaults.
This will cause the function to return a safe (false) value rather than erroring.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* @return `true` is user has access to `operation` through
|
||||
* a common organisation, `false` otherwise.
|
||||
*/
|
||||
function access (userOrgs, projectOrgs, operation) {
|
||||
function access (userOrgs = {}, projectOrgs = {}, operation = undefined) {
|
||||
// console.log("userOrgs", userOrgs);
|
||||
// console.log("projectOrgs", projectOrgs);
|
||||
// console.log("operation", operation);
|
||||
|
||||
Reference in New Issue
Block a user