ocket8888 commented on a change in pull request #6009:
URL: https://github.com/apache/trafficcontrol/pull/6009#discussion_r669959601
##########
File path: docs/source/api/v4/user_current.rst
##########
@@ -35,28 +35,29 @@ No parameters available.
Response Structure
------------------
-:addressLine1: The user's address - including street name and number
-:addressLine2: An additional address field for e.g. apartment number
-:city: The name of the city wherein the user resides
-:company: The name of the company for which the user works
-:country: The name of the country wherein the user resides
-:email: The user's email address
-:fullName: The user's full name, e.g. "John Quincy Adams"
-:gid: A deprecated field only kept for legacy compatibility
reasons that used to contain the UNIX group ID of the user
-:id: An integral, unique identifier for this user
-:lastUpdated: The date and time at which the user was last modified, in
:ref:`non-rfc-datetime`
-:newUser: A meta field with no apparent purpose that is usually
``null`` unless explicitly set during creation or modification of a user via
some API endpoint
-:phoneNumber: The user's phone number
-:postalCode: The postal code of the area in which the user resides
-:publicSshKey: The user's public key used for the SSH protocol
-:registrationSent: If the user was created using the
:ref:`to-api-users-register` endpoint, this will be the date and time at which
the registration email was sent - otherwise it will be ``null``
-:role: The integral, unique identifier of the highest-privilege
:term:`Role` assigned to this user
-:rolename: The name of the highest-privilege :term:`Role` assigned to
this user
-:stateOrProvince: The name of the state or province where this user resides
-:tenant: The name of the :term:`Tenant` to which this user belongs
-:tenantId: The integral, unique identifier of the :term:`Tenant` to
which this user belongs
-:uid: A deprecated field only kept for legacy compatibility
reasons that used to contain the UNIX user ID of the user
-:username: The user's username
+:addressLine1: The user's address - including street name and number
+:addressLine2: An additional address field for e.g. apartment number
+:city: The name of the city wherein the user resides
+:company: The name of the company for which the user works
+:country: The name of the country wherein the user resides
+:email: The user's email address
+:fullName: The user's full name, e.g. "John Quincy Adams"
+:gid: A deprecated field only kept for legacy compatibility
reasons that used to contain the UNIX group ID of the user
+:id: An integral, unique identifier for this user
+:lastAuthenticated: The date and time at which the user was last
authenticated, in :ref:`RFC3339`
Review comment:
> `undefined label: rfc3339`
I think you want:
```rst
:rfc:3339 or :rfc:`3339`
```
either of those work fine. A lot of people prefer to always use the
<kbd>`</kbd>s because they are required in some cases, but in this case they
aren't.
##########
File path: traffic_ops/testing/api/v4/user_test.go
##########
@@ -454,6 +454,12 @@ func GetTestUsers(t *testing.T) {
if err != nil {
t.Errorf("cannot get users: %v - alerts: %+v", err, resp.Alerts)
}
+ if resp.Response == nil {
+ t.Fatalf("expected a users list, got nothing")
+ }
+ if resp.Response[0].LastAuthenticated == nil {
Review comment:
This line will still segfault if Traffic Ops returns an empty list - if
you just check for `len(resp.Response) < 1` or similar it will also handle
`nil` properly since `len([]string(nil)) == 0`
##########
File path: docs/source/api/v4/users.rst
##########
@@ -68,29 +68,30 @@ Request Structure
Response Structure
------------------
-:addressLine1: The user's address - including street name and number
-:addressLine2: An additional address field for e.g. apartment number
-:city: The name of the city wherein the user resides
-:company: The name of the company for which the user works
-:country: The name of the country wherein the user resides
-:email: The user's email address
-:fullName: The user's full name, e.g. "John Quincy Adams"
-:gid: A deprecated field only kept for legacy compatibility
reasons that used to contain the UNIX group ID of the user - now it is always
``null``
-:id: An integral, unique identifier for this user
-:lastUpdated: The date and time at which the user was last modified, in
:ref:`non-rfc-datetime`
-:newUser: A meta field with no apparent purpose that is usually
``null`` unless explicitly set during creation or modification of a user via
some API endpoint
-:phoneNumber: The user's phone number
-:postalCode: The postal code of the area in which the user resides
-:publicSshKey: The user's public key used for the SSH protocol
-:registrationSent: If the user was created using the
:ref:`to-api-users-register` endpoint, this will be the date and time at which
the registration email was sent - otherwise it will be ``null``
-:role: The integral, unique identifier of the highest-privilege
role assigned to this user
-:rolename: The name of the highest-privilege role assigned to this user
-:stateOrProvince: The name of the state or province where this user resides
-:tenant: The name of the tenant to which this user belongs
-:tenantId: The integral, unique identifier of the tenant to which this
user belongs
-:uid: A deprecated field only kept for legacy compatibility
reasons that used to contain the UNIX user ID of the user - now it is always
``null``
-:username: The user's username
-:changeLogCount: The number of change log entries created by the user
+:addressLine1: The user's address - including street name and number
+:addressLine2: An additional address field for e.g. apartment number
+:changeLogCount: The number of change log entries created by the user
+:city: The name of the city wherein the user resides
+:company: The name of the company for which the user works
+:country: The name of the country wherein the user resides
+:email: The user's email address
+:fullName: The user's full name, e.g. "John Quincy Adams"
+:gid: A deprecated field only kept for legacy compatibility
reasons that used to contain the UNIX group ID of the user - now it is always
``null``
+:id: An integral, unique identifier for this user
+:lastAuthenticated: The date and time at which the user was last
authenticated, in :ref:`RFC3339`
Review comment:
same as above RE: undefined label
##########
File path: docs/source/api/v4/users_id.rst
##########
@@ -48,28 +48,29 @@ Request Structure
Response Structure
------------------
-:addressLine1: The user's address - including street name and number
-:addressLine2: An additional address field for e.g. apartment number
-:city: The name of the city wherein the user resides
-:company: The name of the company for which the user works
-:country: The name of the country wherein the user resides
-:email: The user's email address
-:fullName: The user's full name, e.g. "John Quincy Adams"
-:gid: A deprecated field only kept for legacy compatibility
reasons that used to contain the UNIX group ID of the user - now it is always
``null``
-:id: An integral, unique identifier for this user
-:lastUpdated: The date and time at which the user was last modified, in
:ref:`non-rfc-datetime`
-:newUser: A meta field with no apparent purpose that is usually
``null`` unless explicitly set during creation or modification of a user via
some API endpoint
-:phoneNumber: The user's phone number
-:postalCode: The postal code of the area in which the user resides
-:publicSshKey: The user's public key used for the SSH protocol
-:registrationSent: If the user was created using the
:ref:`to-api-users-register` endpoint, this will be the date and time at which
the registration email was sent - otherwise it will be ``null``
-:role: The integral, unique identifier of the highest-privilege
role assigned to this user
-:rolename: The name of the highest-privilege role assigned to this user
-:stateOrProvince: The name of the state or province where this user resides
-:tenant: The name of the tenant to which this user belongs
-:tenantId: The integral, unique identifier of the tenant to which this
user belongs
-:uid: A deprecated field only kept for legacy compatibility
reasons that used to contain the UNIX user ID of the user - now it is always
``null``
-:username: The user's username
+:addressLine1: The user's address - including street name and number
+:addressLine2: An additional address field for e.g. apartment number
+:city: The name of the city wherein the user resides
+:company: The name of the company for which the user works
+:country: The name of the country wherein the user resides
+:email: The user's email address
+:fullName: The user's full name, e.g. "John Quincy Adams"
+:gid: A deprecated field only kept for legacy compatibility
reasons that used to contain the UNIX group ID of the user - now it is always
``null``
+:id: An integral, unique identifier for this user
+:lastAuthenticated: The date and time at which the user was last
authenticated, in :ref:`RFC3339`
Review comment:
same as above RE: undefined label
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]