mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2026-06-15 05:18:39 +02:00
Add simple auth (#186)
This commit is contained in:
@@ -118,7 +118,7 @@ func parseQueryOptionalBoolArray(r *http.Request, key string) ([]bool, error) {
|
||||
return parseQueryBoolArray(r, key)
|
||||
}
|
||||
|
||||
func parseBody(b []byte, i any) error {
|
||||
func parseBody(b []byte, i interface{}) error {
|
||||
dec := json.NewDecoder(bytes.NewBuffer(b))
|
||||
err := dec.Decode(i)
|
||||
if err != nil {
|
||||
@@ -137,7 +137,7 @@ func JSONErrorStatus(w http.ResponseWriter, status int, err error) {
|
||||
w.Write(b)
|
||||
}
|
||||
|
||||
func response(w http.ResponseWriter, v any, err error) {
|
||||
func response(w http.ResponseWriter, v interface{}, err error) {
|
||||
if err != nil {
|
||||
var httpError *HTTPError
|
||||
if errors.As(err, &httpError) {
|
||||
@@ -172,7 +172,7 @@ func validateSchema(body []byte, schema *gojsonschema.Schema, w http.ResponseWri
|
||||
validationErrors = append(validationErrors, valdiationError.String())
|
||||
}
|
||||
|
||||
b, _ := json.Marshal(map[string]any{"error": "wrong input", "errors": validationErrors})
|
||||
b, _ := json.Marshal(map[string]interface{}{"error": "wrong input", "errors": validationErrors})
|
||||
w.Write(b)
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ type Service interface {
|
||||
CurrentUser(context.Context) (*model.UserResponse, error)
|
||||
CurrentUserData(context.Context) (*model.UserDataResponse, error)
|
||||
UpdateCurrentUserData(context.Context, *model.UserData) (*model.UserDataResponse, error)
|
||||
DashboardData(context.Context, string, *string) (map[string]any, error)
|
||||
DashboardData(context.Context, string, *string) (map[string]interface{}, error)
|
||||
ListDashboards(context.Context) ([]*model.DashboardResponse, error)
|
||||
CreateDashboard(context.Context, *model.Dashboard) (*model.DashboardResponse, error)
|
||||
GetDashboard(context.Context, string) (*model.DashboardResponse, error)
|
||||
@@ -60,8 +60,8 @@ type Service interface {
|
||||
RemoveComment(context.Context, int64, int) (*model.TicketWithTickets, error)
|
||||
AddTicketPlaybook(context.Context, int64, *model.PlaybookTemplateForm) (*model.TicketWithTickets, error)
|
||||
RemoveTicketPlaybook(context.Context, int64, string) (*model.TicketWithTickets, error)
|
||||
SetTaskData(context.Context, int64, string, string, map[string]any) (*model.TicketWithTickets, error)
|
||||
CompleteTask(context.Context, int64, string, string, map[string]any) (*model.TicketWithTickets, error)
|
||||
SetTaskData(context.Context, int64, string, string, map[string]interface{}) (*model.TicketWithTickets, error)
|
||||
CompleteTask(context.Context, int64, string, string, map[string]interface{}) (*model.TicketWithTickets, error)
|
||||
SetTaskOwner(context.Context, int64, string, string, string) (*model.TicketWithTickets, error)
|
||||
RunTask(context.Context, int64, string, string) error
|
||||
SetReferences(context.Context, int64, *model.ReferenceArray) (*model.TicketWithTickets, error)
|
||||
@@ -901,7 +901,7 @@ func (s *server) setTaskDataHandler(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
var dataP map[string]any
|
||||
var dataP map[string]interface{}
|
||||
if err := parseBody(body, &dataP); err != nil {
|
||||
JSONError(w, err)
|
||||
return
|
||||
@@ -928,7 +928,7 @@ func (s *server) completeTaskHandler(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
var dataP map[string]any
|
||||
var dataP map[string]interface{}
|
||||
if err := parseBody(body, &dataP); err != nil {
|
||||
JSONError(w, err)
|
||||
return
|
||||
|
||||
+89
-89
File diff suppressed because one or more lines are too long
@@ -7089,8 +7089,14 @@
|
||||
},
|
||||
"type" : "array"
|
||||
},
|
||||
"salt" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"sha256" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"sha512" : {
|
||||
"type" : "string"
|
||||
}
|
||||
},
|
||||
"required" : [ "apikey", "blocked", "roles" ],
|
||||
@@ -7149,6 +7155,9 @@
|
||||
"id" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"password" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"roles" : {
|
||||
"items" : {
|
||||
"type" : "string"
|
||||
|
||||
@@ -1285,8 +1285,12 @@ definitions:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
salt:
|
||||
type: string
|
||||
sha256:
|
||||
type: string
|
||||
sha512:
|
||||
type: string
|
||||
required:
|
||||
- blocked
|
||||
- apikey
|
||||
@@ -1334,6 +1338,8 @@ definitions:
|
||||
type: boolean
|
||||
id:
|
||||
type: string
|
||||
password:
|
||||
type: string
|
||||
roles:
|
||||
items:
|
||||
type: string
|
||||
|
||||
@@ -6510,8 +6510,14 @@
|
||||
},
|
||||
"type" : "array"
|
||||
},
|
||||
"salt" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"sha256" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"sha512" : {
|
||||
"type" : "string"
|
||||
}
|
||||
},
|
||||
"required" : [ "apikey", "blocked", "roles" ],
|
||||
@@ -6570,6 +6576,9 @@
|
||||
"id" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"password" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"roles" : {
|
||||
"items" : {
|
||||
"type" : "string"
|
||||
|
||||
@@ -1166,8 +1166,12 @@ definitions:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
salt:
|
||||
type: string
|
||||
sha256:
|
||||
type: string
|
||||
sha512:
|
||||
type: string
|
||||
required:
|
||||
- blocked
|
||||
- apikey
|
||||
@@ -1215,6 +1219,8 @@ definitions:
|
||||
type: boolean
|
||||
id:
|
||||
type: string
|
||||
password:
|
||||
type: string
|
||||
roles:
|
||||
items:
|
||||
type: string
|
||||
|
||||
+99
-96
@@ -116,10 +116,10 @@ func init() {
|
||||
gojsonschema.NewStringLoader(`{"type":"object","properties":{"default_groups":{"items":{"type":"string"},"type":"array"},"default_playbooks":{"items":{"type":"string"},"type":"array"},"default_template":{"type":"string"},"icon":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name","icon","default_template","default_playbooks"],"$id":"#/definitions/TicketTypeResponse"}`),
|
||||
gojsonschema.NewStringLoader(`{"type":"object","properties":{"artifacts":{"items":{"$ref":"#/definitions/Artifact"},"type":"array"},"comments":{"items":{"$ref":"#/definitions/Comment"},"type":"array"},"created":{"format":"date-time","type":"string"},"details":{"type":"object"},"files":{"items":{"$ref":"#/definitions/File"},"type":"array"},"id":{"format":"int64","type":"integer"},"logs":{"items":{"$ref":"#/definitions/LogEntry"},"type":"array"},"modified":{"format":"date-time","type":"string"},"name":{"type":"string"},"owner":{"type":"string"},"playbooks":{"type":"object","additionalProperties":{"$ref":"#/definitions/PlaybookResponse"}},"read":{"items":{"type":"string"},"type":"array"},"references":{"items":{"$ref":"#/definitions/Reference"},"type":"array"},"schema":{"type":"string"},"status":{"type":"string"},"tickets":{"items":{"$ref":"#/definitions/TicketSimpleResponse"},"type":"array"},"type":{"type":"string"},"write":{"items":{"type":"string"},"type":"array"}},"required":["id","name","type","status","created","modified","schema"],"$id":"#/definitions/TicketWithTickets"}`),
|
||||
gojsonschema.NewStringLoader(`{"type":"object","properties":{"color":{"title":"Color","type":"string","enum":["error","info","success","warning"]},"icon":{"title":"Icon (https://materialdesignicons.com)","type":"string"},"id":{"title":"ID","type":"string"},"name":{"title":"Name","type":"string"}},"required":["id","name","icon"],"$id":"#/definitions/Type"}`),
|
||||
gojsonschema.NewStringLoader(`{"type":"object","properties":{"apikey":{"type":"boolean"},"blocked":{"type":"boolean"},"roles":{"items":{"type":"string"},"type":"array"},"sha256":{"type":"string"}},"required":["blocked","apikey","roles"],"$id":"#/definitions/User"}`),
|
||||
gojsonschema.NewStringLoader(`{"type":"object","properties":{"apikey":{"type":"boolean"},"blocked":{"type":"boolean"},"roles":{"items":{"type":"string"},"type":"array"},"salt":{"type":"string"},"sha256":{"type":"string"},"sha512":{"type":"string"}},"required":["blocked","apikey","roles"],"$id":"#/definitions/User"}`),
|
||||
gojsonschema.NewStringLoader(`{"type":"object","properties":{"email":{"type":"string"},"image":{"type":"string"},"name":{"type":"string"},"timeformat":{"title":"Time Format (https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens)","type":"string"}},"$id":"#/definitions/UserData"}`),
|
||||
gojsonschema.NewStringLoader(`{"type":"object","properties":{"email":{"type":"string"},"id":{"type":"string"},"image":{"type":"string"},"name":{"type":"string"},"timeformat":{"title":"Time Format (https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens)","type":"string"}},"required":["id"],"$id":"#/definitions/UserDataResponse"}`),
|
||||
gojsonschema.NewStringLoader(`{"type":"object","properties":{"apikey":{"type":"boolean"},"blocked":{"type":"boolean"},"id":{"type":"string"},"roles":{"items":{"type":"string"},"type":"array"}},"required":["id","blocked","roles","apikey"],"$id":"#/definitions/UserForm"}`),
|
||||
gojsonschema.NewStringLoader(`{"type":"object","properties":{"apikey":{"type":"boolean"},"blocked":{"type":"boolean"},"id":{"type":"string"},"password":{"type":"string"},"roles":{"items":{"type":"string"},"type":"array"}},"required":["id","blocked","roles","apikey"],"$id":"#/definitions/UserForm"}`),
|
||||
gojsonschema.NewStringLoader(`{"type":"object","properties":{"apikey":{"type":"boolean"},"blocked":{"type":"boolean"},"id":{"type":"string"},"roles":{"items":{"type":"string"},"type":"array"}},"required":["id","blocked","roles","apikey"],"$id":"#/definitions/UserResponse"}`),
|
||||
gojsonschema.NewStringLoader(`{"type":"object","properties":{"aggregation":{"type":"string"},"filter":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["bar","line","pie"]},"width":{"maximum":12,"type":"integer"}},"required":["name","type","aggregation","width"],"$id":"#/definitions/Widget"}`),
|
||||
)
|
||||
@@ -251,14 +251,14 @@ type DashboardResponse struct {
|
||||
}
|
||||
|
||||
type Enrichment struct {
|
||||
Created time.Time `json:"created"`
|
||||
Data map[string]any `json:"data"`
|
||||
Name string `json:"name"`
|
||||
Created time.Time `json:"created"`
|
||||
Data map[string]interface{} `json:"data"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type EnrichmentForm struct {
|
||||
Data map[string]any `json:"data"`
|
||||
Name string `json:"name"`
|
||||
Data map[string]interface{} `json:"data"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type File struct {
|
||||
@@ -267,39 +267,39 @@ type File struct {
|
||||
}
|
||||
|
||||
type Job struct {
|
||||
Automation string `json:"automation"`
|
||||
Container *string `json:"container,omitempty"`
|
||||
Log *string `json:"log,omitempty"`
|
||||
Origin *Origin `json:"origin,omitempty"`
|
||||
Output map[string]any `json:"output,omitempty"`
|
||||
Payload any `json:"payload,omitempty"`
|
||||
Running bool `json:"running"`
|
||||
Status string `json:"status"`
|
||||
Automation string `json:"automation"`
|
||||
Container *string `json:"container,omitempty"`
|
||||
Log *string `json:"log,omitempty"`
|
||||
Origin *Origin `json:"origin,omitempty"`
|
||||
Output map[string]interface{} `json:"output,omitempty"`
|
||||
Payload interface{} `json:"payload,omitempty"`
|
||||
Running bool `json:"running"`
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
type JobForm struct {
|
||||
Automation string `json:"automation"`
|
||||
Origin *Origin `json:"origin,omitempty"`
|
||||
Payload any `json:"payload,omitempty"`
|
||||
Automation string `json:"automation"`
|
||||
Origin *Origin `json:"origin,omitempty"`
|
||||
Payload interface{} `json:"payload,omitempty"`
|
||||
}
|
||||
|
||||
type JobResponse struct {
|
||||
Automation string `json:"automation"`
|
||||
Container *string `json:"container,omitempty"`
|
||||
ID string `json:"id"`
|
||||
Log *string `json:"log,omitempty"`
|
||||
Origin *Origin `json:"origin,omitempty"`
|
||||
Output map[string]any `json:"output,omitempty"`
|
||||
Payload any `json:"payload,omitempty"`
|
||||
Status string `json:"status"`
|
||||
Automation string `json:"automation"`
|
||||
Container *string `json:"container,omitempty"`
|
||||
ID string `json:"id"`
|
||||
Log *string `json:"log,omitempty"`
|
||||
Origin *Origin `json:"origin,omitempty"`
|
||||
Output map[string]interface{} `json:"output,omitempty"`
|
||||
Payload interface{} `json:"payload,omitempty"`
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
type JobUpdate struct {
|
||||
Container *string `json:"container,omitempty"`
|
||||
Log *string `json:"log,omitempty"`
|
||||
Output map[string]any `json:"output,omitempty"`
|
||||
Running bool `json:"running"`
|
||||
Status string `json:"status"`
|
||||
Container *string `json:"container,omitempty"`
|
||||
Log *string `json:"log,omitempty"`
|
||||
Output map[string]interface{} `json:"output,omitempty"`
|
||||
Running bool `json:"running"`
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
type LogEntry struct {
|
||||
@@ -312,7 +312,7 @@ type LogEntry struct {
|
||||
|
||||
type Message struct {
|
||||
Context *Context `json:"context,omitempty"`
|
||||
Payload any `json:"payload,omitempty"`
|
||||
Payload interface{} `json:"payload,omitempty"`
|
||||
Secrets map[string]string `json:"secrets,omitempty"`
|
||||
}
|
||||
|
||||
@@ -385,18 +385,18 @@ type Statistics struct {
|
||||
}
|
||||
|
||||
type Task struct {
|
||||
Automation *string `json:"automation,omitempty"`
|
||||
Closed *time.Time `json:"closed,omitempty"`
|
||||
Created time.Time `json:"created"`
|
||||
Data map[string]any `json:"data,omitempty"`
|
||||
Done bool `json:"done"`
|
||||
Join *bool `json:"join,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Next map[string]string `json:"next,omitempty"`
|
||||
Owner *string `json:"owner,omitempty"`
|
||||
Payload map[string]string `json:"payload,omitempty"`
|
||||
Schema map[string]any `json:"schema,omitempty"`
|
||||
Type string `json:"type"`
|
||||
Automation *string `json:"automation,omitempty"`
|
||||
Closed *time.Time `json:"closed,omitempty"`
|
||||
Created time.Time `json:"created"`
|
||||
Data map[string]interface{} `json:"data,omitempty"`
|
||||
Done bool `json:"done"`
|
||||
Join *bool `json:"join,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Next map[string]string `json:"next,omitempty"`
|
||||
Owner *string `json:"owner,omitempty"`
|
||||
Payload map[string]string `json:"payload,omitempty"`
|
||||
Schema map[string]interface{} `json:"schema,omitempty"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
type TaskOrigin struct {
|
||||
@@ -406,20 +406,20 @@ type TaskOrigin struct {
|
||||
}
|
||||
|
||||
type TaskResponse struct {
|
||||
Active bool `json:"active"`
|
||||
Automation *string `json:"automation,omitempty"`
|
||||
Closed *time.Time `json:"closed,omitempty"`
|
||||
Created time.Time `json:"created"`
|
||||
Data map[string]any `json:"data,omitempty"`
|
||||
Done bool `json:"done"`
|
||||
Join *bool `json:"join,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Next map[string]string `json:"next,omitempty"`
|
||||
Order int64 `json:"order"`
|
||||
Owner *string `json:"owner,omitempty"`
|
||||
Payload map[string]string `json:"payload,omitempty"`
|
||||
Schema map[string]any `json:"schema,omitempty"`
|
||||
Type string `json:"type"`
|
||||
Active bool `json:"active"`
|
||||
Automation *string `json:"automation,omitempty"`
|
||||
Closed *time.Time `json:"closed,omitempty"`
|
||||
Created time.Time `json:"created"`
|
||||
Data map[string]interface{} `json:"data,omitempty"`
|
||||
Done bool `json:"done"`
|
||||
Join *bool `json:"join,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Next map[string]string `json:"next,omitempty"`
|
||||
Order int64 `json:"order"`
|
||||
Owner *string `json:"owner,omitempty"`
|
||||
Payload map[string]string `json:"payload,omitempty"`
|
||||
Schema map[string]interface{} `json:"schema,omitempty"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
type TaskWithContext struct {
|
||||
@@ -432,28 +432,28 @@ type TaskWithContext struct {
|
||||
}
|
||||
|
||||
type Ticket struct {
|
||||
Artifacts []*Artifact `json:"artifacts,omitempty"`
|
||||
Comments []*Comment `json:"comments,omitempty"`
|
||||
Created time.Time `json:"created"`
|
||||
Details map[string]any `json:"details,omitempty"`
|
||||
Files []*File `json:"files,omitempty"`
|
||||
Modified time.Time `json:"modified"`
|
||||
Name string `json:"name"`
|
||||
Owner *string `json:"owner,omitempty"`
|
||||
Playbooks map[string]*Playbook `json:"playbooks,omitempty"`
|
||||
Read []string `json:"read,omitempty"`
|
||||
References []*Reference `json:"references,omitempty"`
|
||||
Schema string `json:"schema"`
|
||||
Status string `json:"status"`
|
||||
Type string `json:"type"`
|
||||
Write []string `json:"write,omitempty"`
|
||||
Artifacts []*Artifact `json:"artifacts,omitempty"`
|
||||
Comments []*Comment `json:"comments,omitempty"`
|
||||
Created time.Time `json:"created"`
|
||||
Details map[string]interface{} `json:"details,omitempty"`
|
||||
Files []*File `json:"files,omitempty"`
|
||||
Modified time.Time `json:"modified"`
|
||||
Name string `json:"name"`
|
||||
Owner *string `json:"owner,omitempty"`
|
||||
Playbooks map[string]*Playbook `json:"playbooks,omitempty"`
|
||||
Read []string `json:"read,omitempty"`
|
||||
References []*Reference `json:"references,omitempty"`
|
||||
Schema string `json:"schema"`
|
||||
Status string `json:"status"`
|
||||
Type string `json:"type"`
|
||||
Write []string `json:"write,omitempty"`
|
||||
}
|
||||
|
||||
type TicketForm struct {
|
||||
Artifacts []*Artifact `json:"artifacts,omitempty"`
|
||||
Comments []*Comment `json:"comments,omitempty"`
|
||||
Created *time.Time `json:"created,omitempty"`
|
||||
Details map[string]any `json:"details,omitempty"`
|
||||
Details map[string]interface{} `json:"details,omitempty"`
|
||||
Files []*File `json:"files,omitempty"`
|
||||
ID *int64 `json:"id,omitempty"`
|
||||
Modified *time.Time `json:"modified,omitempty"`
|
||||
@@ -479,7 +479,7 @@ type TicketResponse struct {
|
||||
Artifacts []*Artifact `json:"artifacts,omitempty"`
|
||||
Comments []*Comment `json:"comments,omitempty"`
|
||||
Created time.Time `json:"created"`
|
||||
Details map[string]any `json:"details,omitempty"`
|
||||
Details map[string]interface{} `json:"details,omitempty"`
|
||||
Files []*File `json:"files,omitempty"`
|
||||
ID int64 `json:"id"`
|
||||
Modified time.Time `json:"modified"`
|
||||
@@ -495,22 +495,22 @@ type TicketResponse struct {
|
||||
}
|
||||
|
||||
type TicketSimpleResponse struct {
|
||||
Artifacts []*Artifact `json:"artifacts,omitempty"`
|
||||
Comments []*Comment `json:"comments,omitempty"`
|
||||
Created time.Time `json:"created"`
|
||||
Details map[string]any `json:"details,omitempty"`
|
||||
Files []*File `json:"files,omitempty"`
|
||||
ID int64 `json:"id"`
|
||||
Modified time.Time `json:"modified"`
|
||||
Name string `json:"name"`
|
||||
Owner *string `json:"owner,omitempty"`
|
||||
Playbooks map[string]*Playbook `json:"playbooks,omitempty"`
|
||||
Read []string `json:"read,omitempty"`
|
||||
References []*Reference `json:"references,omitempty"`
|
||||
Schema string `json:"schema"`
|
||||
Status string `json:"status"`
|
||||
Type string `json:"type"`
|
||||
Write []string `json:"write,omitempty"`
|
||||
Artifacts []*Artifact `json:"artifacts,omitempty"`
|
||||
Comments []*Comment `json:"comments,omitempty"`
|
||||
Created time.Time `json:"created"`
|
||||
Details map[string]interface{} `json:"details,omitempty"`
|
||||
Files []*File `json:"files,omitempty"`
|
||||
ID int64 `json:"id"`
|
||||
Modified time.Time `json:"modified"`
|
||||
Name string `json:"name"`
|
||||
Owner *string `json:"owner,omitempty"`
|
||||
Playbooks map[string]*Playbook `json:"playbooks,omitempty"`
|
||||
Read []string `json:"read,omitempty"`
|
||||
References []*Reference `json:"references,omitempty"`
|
||||
Schema string `json:"schema"`
|
||||
Status string `json:"status"`
|
||||
Type string `json:"type"`
|
||||
Write []string `json:"write,omitempty"`
|
||||
}
|
||||
|
||||
type TicketTemplate struct {
|
||||
@@ -560,7 +560,7 @@ type TicketWithTickets struct {
|
||||
Artifacts []*Artifact `json:"artifacts,omitempty"`
|
||||
Comments []*Comment `json:"comments,omitempty"`
|
||||
Created time.Time `json:"created"`
|
||||
Details map[string]any `json:"details,omitempty"`
|
||||
Details map[string]interface{} `json:"details,omitempty"`
|
||||
Files []*File `json:"files,omitempty"`
|
||||
ID int64 `json:"id"`
|
||||
Logs []*LogEntry `json:"logs,omitempty"`
|
||||
@@ -588,7 +588,9 @@ type User struct {
|
||||
Apikey bool `json:"apikey"`
|
||||
Blocked bool `json:"blocked"`
|
||||
Roles []string `json:"roles"`
|
||||
Salt *string `json:"salt,omitempty"`
|
||||
Sha256 *string `json:"sha256,omitempty"`
|
||||
Sha512 *string `json:"sha512,omitempty"`
|
||||
}
|
||||
|
||||
type UserData struct {
|
||||
@@ -607,10 +609,11 @@ type UserDataResponse struct {
|
||||
}
|
||||
|
||||
type UserForm struct {
|
||||
Apikey bool `json:"apikey"`
|
||||
Blocked bool `json:"blocked"`
|
||||
ID string `json:"id"`
|
||||
Roles []string `json:"roles"`
|
||||
Apikey bool `json:"apikey"`
|
||||
Blocked bool `json:"blocked"`
|
||||
ID string `json:"id"`
|
||||
Password *string `json:"password,omitempty"`
|
||||
Roles []string `json:"roles"`
|
||||
}
|
||||
|
||||
type UserResponse struct {
|
||||
|
||||
Reference in New Issue
Block a user