add groups feature

This commit is contained in:
Denis barbaron
2019-06-12 10:29:07 +02:00
parent 6fd750dad5
commit 7f5dc4c152
119 changed files with 12416 additions and 402 deletions

View File

@@ -1,3 +1,7 @@
/**
* Copyright © 2019 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
**/
var logger = require('./logger')
var log = logger.createLogger('util:deviceutil')
@@ -8,7 +12,7 @@ deviceutil.isOwnedByUser = function(device, user) {
return device.present &&
device.ready &&
device.owner &&
device.owner.email === user.email &&
(device.owner.email === user.email || user.privilege === 'admin') &&
device.using
}