mirror of
https://github.com/gravitl/netmaker.git
synced 2024-09-20 07:16:06 +08:00
Net 1227 v2 (#3073)
* add list roles to pro and ce * if not pro set user role to admin
This commit is contained in:
parent
a39da31fa6
commit
d95b96ad6e
|
@ -410,6 +410,9 @@ func createUser(w http.ResponseWriter, r *http.Request) {
|
|||
logic.ReturnErrorResponse(w, r, logic.FormatError(err, "badrequest"))
|
||||
return
|
||||
}
|
||||
if !servercfg.IsPro {
|
||||
user.PlatformRoleID = models.AdminRole
|
||||
}
|
||||
|
||||
if user.PlatformRoleID == "" {
|
||||
logic.ReturnErrorResponse(w, r, logic.FormatError(errors.New("platform role is missing"), "badrequest"))
|
||||
|
|
Loading…
Reference in a new issue