mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-09 14:13:35 +00:00
Allow user to request notifications when adding printer ACL (#585)
This commit is contained in:
@ -827,7 +827,7 @@ gam delete printer <PrinterID>
|
||||
gam info printer <PrinterID> [everything]
|
||||
gam print printers [todrive] [query <QueryPrinter>] [type <String>] [status <String>] [extrafields <String>]
|
||||
|
||||
gam printer <PrinterID> add user|manager|owner <EmailAddress>|[domain:]<DomainName>|public
|
||||
gam printer <PrinterID> add user|manager|owner <EmailAddress>|[domain:]<DomainName>|public [notify]
|
||||
gam printer <PrinterID> delete <EmailAddress>|[domain:]<DomainName>|public
|
||||
gam printer <PrinterID> showacl
|
||||
gam printjob <PrintJobID> cancel
|
||||
|
@ -2893,6 +2893,7 @@ def doPrinterAddACL():
|
||||
printer = sys.argv[2]
|
||||
role = sys.argv[4].upper()
|
||||
scope = sys.argv[5]
|
||||
notify = True if len(sys.argv) > 6 and sys.argv[6].lower() == u'notify' else False
|
||||
public = None
|
||||
skip_notification = True
|
||||
if scope.lower() == u'public':
|
||||
@ -2902,6 +2903,8 @@ def doPrinterAddACL():
|
||||
skip_notification = None
|
||||
elif scope.find(u'@') == -1:
|
||||
scope = u'/hd/domain/%s' % scope
|
||||
else:
|
||||
skip_notification = not notify
|
||||
result = callGAPI(cp.printers(), u'share', printerid=printer, role=role, scope=scope, public=public, skip_notification=skip_notification)
|
||||
checkCloudPrintResult(result)
|
||||
who = scope
|
||||
|
Reference in New Issue
Block a user