mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-20 01:06:45 +00:00
[management] restrict dashboard only to restrictable roles
This commit is contained in:
@@ -286,11 +286,11 @@ func (h *handler) getCurrentUser(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
func toUserWithPermissionsResponse(user *users.UserInfoWithPermissions, userID string) *api.User {
|
||||
response := toUserResponse(user.UserInfo, userID)
|
||||
if user.Permissions == nil {
|
||||
return response
|
||||
|
||||
permissions := api.UserPermissions{
|
||||
IsRestricted: user.Restricted,
|
||||
}
|
||||
|
||||
permissions := &api.UserPermissions{}
|
||||
if len(user.Permissions.AutoAllowNew) > 0 {
|
||||
permissions.Default = make(map[string]bool)
|
||||
for k, v := range user.Permissions.AutoAllowNew {
|
||||
|
||||
Reference in New Issue
Block a user