init - add project files

This commit is contained in:
2025-03-06 23:54:11 -05:00
commit e724ff1120
1363 changed files with 897467 additions and 0 deletions

35
users/permissions.go Normal file
View File

@@ -0,0 +1,35 @@
package users
import "encoding/json"
type Permissions struct {
Admin bool
Orders struct {
View bool
Edit bool
}
Users struct {
View bool
Edit bool
}
}
func GetPermissionsFromJSON(jsonInput string) Permissions {
var perms Permissions
json.Unmarshal([]byte(jsonInput), &perms)
return perms
}
func GetPermissionsJSON(p Permissions) string {
jsonData, _ := json.Marshal(p)
return string(jsonData)
}
func SetUserPermissions(p Permissions) error {
// implement
return nil
}