mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-20 17:26:40 +00:00
[management] user info with role permissions
This commit is contained in:
@@ -191,11 +191,35 @@ components:
|
||||
UserPermissions:
|
||||
type: object
|
||||
properties:
|
||||
dashboard_view:
|
||||
description: User's permission to view the dashboard
|
||||
type: string
|
||||
enum: [ "limited", "blocked", "full" ]
|
||||
example: limited
|
||||
permissions:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: boolean
|
||||
propertyNames:
|
||||
type: string
|
||||
enum:
|
||||
- read
|
||||
- write
|
||||
propertyNames:
|
||||
type: string
|
||||
enum:
|
||||
- read
|
||||
- write
|
||||
example: {"networks": { "read": true, "write": false}, "peers": { "read": false, "write": false} }
|
||||
auto_allow_new:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: boolean
|
||||
propertyNames:
|
||||
type: string
|
||||
enum:
|
||||
- read
|
||||
- write
|
||||
required:
|
||||
- permissions
|
||||
- auto_allow_new
|
||||
UserRequest:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
@@ -178,13 +178,6 @@ const (
|
||||
UserStatusInvited UserStatus = "invited"
|
||||
)
|
||||
|
||||
// Defines values for UserPermissionsDashboardView.
|
||||
const (
|
||||
UserPermissionsDashboardViewBlocked UserPermissionsDashboardView = "blocked"
|
||||
UserPermissionsDashboardViewFull UserPermissionsDashboardView = "full"
|
||||
UserPermissionsDashboardViewLimited UserPermissionsDashboardView = "limited"
|
||||
)
|
||||
|
||||
// AccessiblePeer defines model for AccessiblePeer.
|
||||
type AccessiblePeer struct {
|
||||
// CityName Commonly used English name of the city
|
||||
@@ -1710,13 +1703,10 @@ type UserCreateRequest struct {
|
||||
|
||||
// UserPermissions defines model for UserPermissions.
|
||||
type UserPermissions struct {
|
||||
// DashboardView User's permission to view the dashboard
|
||||
DashboardView *UserPermissionsDashboardView `json:"dashboard_view,omitempty"`
|
||||
AutoAllowNew map[string]bool `json:"auto_allow_new"`
|
||||
Permissions map[string]map[string]bool `json:"permissions"`
|
||||
}
|
||||
|
||||
// UserPermissionsDashboardView User's permission to view the dashboard
|
||||
type UserPermissionsDashboardView string
|
||||
|
||||
// UserRequest defines model for UserRequest.
|
||||
type UserRequest struct {
|
||||
// AutoGroups Group IDs to auto-assign to peers registered by this user
|
||||
|
||||
Reference in New Issue
Block a user