mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-28 09:51:36 +00:00
Updated gam remove aliases <EmailAddress> user|group <EmailAddressEntity>
This commit is contained in:
@@ -85,7 +85,7 @@ gam <UserTypeEntity> delete aliases
|
||||
```
|
||||
|
||||
## Display aliases
|
||||
Display a specific alise.
|
||||
Display a specific alias.
|
||||
```
|
||||
gam info alias|aliases <EmailAddressEntity>
|
||||
```
|
||||
|
||||
@@ -11,6 +11,15 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
|
||||
|
||||
See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Windows or other options, including manual installation
|
||||
|
||||
### 6.67.21
|
||||
|
||||
Updated `gam remove aliases <EmailAddress> user|group <EmailAddressEntity>` to give a more informative
|
||||
error message when the target/alias combination does not exist.
|
||||
```
|
||||
Old: User: testsimple@rdschool.org, User Alias: tsalias@rdschool.org, Remove Failed: Invalid Input: resource_id
|
||||
New: User: testsimple@rdschool.org, User Alias: tsalias@rdschool.org, Remove Failed: Does not exist
|
||||
```
|
||||
|
||||
### 6.67.20
|
||||
|
||||
Added option `onelicenseperrow|onelicenceperrow` to `gam print users ... licenses` that causes GAM to print
|
||||
|
||||
@@ -334,7 +334,7 @@ writes the credentials into the file oauth2.txt.
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ rm -f /Users/admin/GAMConfig/oauth2.txt
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam version
|
||||
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
|
||||
GAMADV-XTD3 6.67.20 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.67.21 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.1 64-bit final
|
||||
MacOS Sonoma 14.2.1 x86_64
|
||||
@@ -1002,7 +1002,7 @@ writes the credentials into the file oauth2.txt.
|
||||
C:\GAMADV-XTD3>del C:\GAMConfig\oauth2.txt
|
||||
C:\GAMADV-XTD3>gam version
|
||||
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
|
||||
GAMADV-XTD3 6.67.20 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.67.21 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.1 64-bit final
|
||||
Windows-10-10.0.17134 AMD64
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Reseller
|
||||
- [API documentation](#api-documentation)
|
||||
- [Notes](#notes)
|
||||
- [Manage Multiple Domains](#manage-multiple-domains)
|
||||
- [Definitions](#definitions)
|
||||
- [Manage Resold Customers](#manage-resold-customers)
|
||||
- [Display Resold Customers](#display-resold-customers)
|
||||
@@ -25,6 +26,11 @@ Prior to version 6.50.00, this is how the `seats <NumberOfSeats> <MaximumNumberO
|
||||
|
||||
Now, you can still use the above option which has been corrected or you can specify `seats <Number>` which will be properly passed in the correct form to the API based on plan name.
|
||||
|
||||
## Manage Multiple Domains
|
||||
Thanks to Duncan Isaksen-Loxton for a script to help manage multiple domains.
|
||||
|
||||
* See: https://gist.github.com/65/b5e9cee9b5812b487b8ae3e8256e262b
|
||||
|
||||
## Definitions
|
||||
```
|
||||
<CustomerID> ::= <String>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Print the current version of Gam with details
|
||||
```
|
||||
gam version
|
||||
GAMADV-XTD3 6.67.20 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.67.21 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.1 64-bit final
|
||||
MacOS Sonoma 14.2.1 x86_64
|
||||
@@ -16,7 +16,7 @@ Time: 2023-06-02T21:10:00-07:00
|
||||
Print the current version of Gam with details and time offset information
|
||||
```
|
||||
gam version timeoffset
|
||||
GAMADV-XTD3 6.67.20 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.67.21 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.1 64-bit final
|
||||
MacOS Sonoma 14.2.1 x86_64
|
||||
@@ -28,7 +28,7 @@ Your system time differs from www.googleapis.com by less than 1 second
|
||||
Print the current version of Gam with extended details and SSL information
|
||||
```
|
||||
gam version extended
|
||||
GAMADV-XTD3 6.67.20 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.67.21 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.1 64-bit final
|
||||
MacOS Sonoma 14.2.1 x86_64
|
||||
@@ -65,7 +65,7 @@ MacOS High Sierra 10.13.6 x86_64
|
||||
Path: /Users/Admin/bin/gamadv-xtd3
|
||||
Version Check:
|
||||
Current: 5.35.08
|
||||
Latest: 6.67.20
|
||||
Latest: 6.67.21
|
||||
echo $?
|
||||
1
|
||||
```
|
||||
@@ -73,7 +73,7 @@ echo $?
|
||||
Print the current version number without details
|
||||
```
|
||||
gam version simple
|
||||
6.67.20
|
||||
6.67.21
|
||||
```
|
||||
In Linux/MacOS you can do:
|
||||
```
|
||||
@@ -83,7 +83,7 @@ echo $VER
|
||||
Print the current version of Gam and address of this Wiki
|
||||
```
|
||||
gam help
|
||||
GAM 6.67.20 - https://github.com/taers232c/GAMADV-XTD3
|
||||
GAM 6.67.21 - https://github.com/taers232c/GAMADV-XTD3
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.1 64-bit final
|
||||
MacOS Sonoma 14.2.1 x86_64
|
||||
|
||||
@@ -2,6 +2,15 @@
|
||||
|
||||
Merged GAM-Team version
|
||||
|
||||
6.67.21
|
||||
|
||||
Updated `gam remove aliases <EmailAddress> user|group <EmailAddressEntity>` to give a more informative
|
||||
error message when the target/alias combination does not exist.
|
||||
```
|
||||
Old: User: testsimple@rdschool.org, User Alias: tsalias@rdschool.org, Remove Failed: Invalid Input: resource_id
|
||||
New: User: testsimple@rdschool.org, User Alias: tsalias@rdschool.org, Remove Failed: Does not exist
|
||||
```
|
||||
|
||||
6.67.20
|
||||
|
||||
Added option `onelicenseperrow|onelicenceperrow` to `gam print users ... licenses` that causes GAM to print
|
||||
|
||||
@@ -17591,8 +17591,10 @@ def doRemoveAliases():
|
||||
GAPI.CONDITION_NOT_MET],
|
||||
userKey=targetEmail, alias=aliasEmail)
|
||||
entityActionPerformed([Ent.USER, targetEmail, Ent.USER_ALIAS, aliasEmail], i, count)
|
||||
except (GAPI.userNotFound, GAPI.badRequest, GAPI.invalid, GAPI.forbidden, GAPI.invalidResource, GAPI.conditionNotMet) as e:
|
||||
except (GAPI.userNotFound, GAPI.badRequest, GAPI.invalid, GAPI.forbidden, GAPI.conditionNotMet) as e:
|
||||
entityActionFailedWarning([Ent.USER, targetEmail, Ent.USER_ALIAS, aliasEmail], str(e), i, count)
|
||||
except GAPI.invalidResource:
|
||||
entityActionFailedWarning([Ent.USER, targetEmail, Ent.USER_ALIAS, aliasEmail], Msg.DOES_NOT_EXIST, i, count)
|
||||
else:
|
||||
try:
|
||||
for aliasEmail in entityList:
|
||||
@@ -17603,8 +17605,10 @@ def doRemoveAliases():
|
||||
GAPI.CONDITION_NOT_MET],
|
||||
groupKey=targetEmail, alias=aliasEmail)
|
||||
entityActionPerformed([Ent.GROUP, targetEmail, Ent.GROUP_ALIAS, aliasEmail], i, count)
|
||||
except (GAPI.groupNotFound, GAPI.userNotFound, GAPI.badRequest, GAPI.invalid, GAPI.forbidden, GAPI.invalidResource, GAPI.conditionNotMet) as e:
|
||||
except (GAPI.groupNotFound, GAPI.userNotFound, GAPI.badRequest, GAPI.invalid, GAPI.forbidden, GAPI.conditionNotMet) as e:
|
||||
entityActionFailedWarning([Ent.GROUP, targetEmail, Ent.GROUP_ALIAS, aliasEmail], str(e), i, count)
|
||||
except GAPI.invalidResource:
|
||||
entityActionFailedWarning([Ent.GROUP, targetEmail, Ent.GROUP_ALIAS, aliasEmail], Msg.DOES_NOT_EXIST, i, count)
|
||||
|
||||
def _addUserAliases(cd, user, aliasList, i, count):
|
||||
jcount = len(aliasList)
|
||||
@@ -40727,7 +40731,10 @@ class PasswordOptions():
|
||||
elif self.b64DecryptPassword:
|
||||
if body[up].lower()[:5] in ['{md5}', '{sha}']:
|
||||
body[up] = body[up][5:]
|
||||
body[up] = base64.b64decode(body[up]).hex()
|
||||
try:
|
||||
body[up] = base64.b64decode(body[up]).hex()
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
def AssignPassword(self, body, notify, notFoundBody, createIfNotFound):
|
||||
up = 'password'
|
||||
@@ -42837,9 +42844,10 @@ def doPrintUsers(entityList=None):
|
||||
csvPF.AddTitles(['Groups'])
|
||||
if printOptions['getLicenseFeed'] or printOptions['getLicenseFeedByUser']:
|
||||
if not oneLicensePerRow:
|
||||
csvPF.AddTitles(['LicensesCount', 'Licenses', 'LicensesDisplay'])
|
||||
licenseTitles = ['LicensesCount', 'Licenses', 'LicensesDisplay']
|
||||
else:
|
||||
csvPF.AddTitles(['License', 'LicenseDisplay'])
|
||||
licenseTitles = ['License', 'LicenseDisplay']
|
||||
csvPF.AddTitles(licenseTitles)
|
||||
if printOptions['getLicenseFeed']:
|
||||
if skus is None and GM.Globals[GM.LICENSE_SKUS]:
|
||||
skus = GM.Globals[GM.LICENSE_SKUS]
|
||||
@@ -42979,10 +42987,7 @@ def doPrintUsers(entityList=None):
|
||||
else:
|
||||
csvPF.MoveTitlesToEnd(['Groups']+[f'Groups{GC.Values[GC.CSV_OUTPUT_SUBFIELD_DELIMITER]}{j}' for j in range(printOptions['maxGroups'])])
|
||||
if printOptions['getLicenseFeed'] or printOptions['getLicenseFeedByUser']:
|
||||
if not oneLicensePerRow:
|
||||
csvPF.MoveTitlesToEnd(['LicensesCount', 'Licenses', 'LicensesDisplay'])
|
||||
else:
|
||||
csvPF.MoveTitlesToEnd(['License', 'LicenseDisplay'])
|
||||
csvPF.MoveTitlesToEnd(licenseTitles)
|
||||
elif not FJQC.formatJSON:
|
||||
for domain, count in sorted(iter(domainCounts.items())):
|
||||
csvPF.WriteRowNoFilter({'domain': domain, 'count': count})
|
||||
|
||||
Reference in New Issue
Block a user