feat(rbac): detect if rbac is enabled [EE-4308] (#8139)

This commit is contained in:
Ali
2022-12-07 15:53:06 +13:00
committed by GitHub
parent 8dcc5e4adb
commit c1cc8bad77
10 changed files with 327 additions and 6 deletions

View File

@@ -0,0 +1,14 @@
package randomstring
import "math/rand"
const letterBytes = "abcdefghijklmnopqrstuvwxyz0123456789"
// RandomString returns a random lowercase alphanumeric string of length n
func RandomString(n int) string {
b := make([]byte, n)
for i := range b {
b[i] = letterBytes[rand.Intn(len(letterBytes))]
}
return string(b)
}