From a7ac7ea1ed53753964f8edd1528ce2ef11cb0385 Mon Sep 17 00:00:00 2001 From: "$(pass /github/name)" <$(pass /github/email)> Date: Tue, 3 Sep 2024 20:53:40 +0200 Subject: [PATCH] Add: Roles --- internal/constants/constants.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/internal/constants/constants.go b/internal/constants/constants.go index 0fca8ac..6b7ddd2 100644 --- a/internal/constants/constants.go +++ b/internal/constants/constants.go @@ -1,5 +1,12 @@ package constants +type roles struct { + Member int8 + Viewer int8 + Editor int8 + Admin int8 +} + const ( UnverifiedStatus = iota + 1 VerifiedStatus @@ -14,3 +21,15 @@ const ( MailWelcomeSubject = "Willkommen beim Dörpsmobil Hasloh e.V." MailContactSubject = "Jemand hat das Kontaktformular gefunden" ) + +var Roles = roles{ + Member: 0, + Viewer: 1, + Editor: 4, + Admin: 8, +} + +const PRIV_VIEW = 1 +const PRIV_ADD = 2 +const PRIV_EDIT = 4 +const PRIV_DELETE = 8