zrhoffman commented on code in PR #7819:
URL: https://github.com/apache/trafficcontrol/pull/7819#discussion_r1340482166
##########
lib/go-tc/constants.go:
##########
@@ -98,3 +98,15 @@ func (a AlertLevel) String() string {
// CachegroupCoordinateNamePrefix is a string that all cache group coordinate
// names are prefixed with.
const CachegroupCoordinateNamePrefix = "from_cachegroup_"
+
+// ParameterSecureRead is a string representing the permission to be able to
read secure parameters.
+const ParameterSecureRead = "PARAMETER:SECURE-READ"
+
+// SecureServerRead is a string representing the permission to be able to read
secure server properties.
+const SecureServerRead = "SECURE-SERVER:READ"
+
+// CDNLocksDeleteOthers is a string representing the permission to be able to
delete other users' CDN locks.
+const CDNLocksDeleteOthers = "CDN-LOCK:DELETE-OTHERS"
+
+// ICDNUCDNOverride is a string representing the permission to be able to
override the ucdn parameter.
+const ICDNUCDNOverride = "ICDN:UCDN-OVERRIDE"
Review Comment:
IMO it is a little confusing to have other similarly-named things in the
`tc` package used for a different purpose
* `ParameterSecureRead`
* `ParametersResponse`
* `CDNLocksDeleteOthers`
* `CDNLocksGetResponse`
and so on.
So either:
* Permissions constants like these should be in their own separate package,
or
* The constant names all start with the same prefix like `Perm`
Whether it's `perm.ParameterSecureRead` or `tc.PermParameterSecureRead` (or
any other package name or prefix you come up with, it doesn't need to be
`perm`), it should be obvious to someone unfamiliar with those specific
constants what those constants are used for.
--
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]