INNER CODE UNIT · Go

checkRole

iimeta/fastapi-admin · internal/cmd/cmd.go:532

func checkRole(roles []string, userRole string) bool {
	for _, role := range roles {
		if role == userRole {
			return true
		}
	}
	return false
}

func parseMultipartFormData(r *ghttp.Request) map[string]interface{} {

	formData := make(map[string]interface{})

	for k, v := range r.GetFormMap() {
		formData[k] = sanitizeFormValue(v)
	}

	if form := r.GetMultipartForm(); form != nil {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…