-
Notifications
You must be signed in to change notification settings - Fork 0
/
role.go
28 lines (21 loc) · 633 Bytes
/
role.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package gorsk
// AccessRole represents access role type
type AccessRole int
const (
// SuperAdminRole has all permissions
SuperAdminRole AccessRole = 100
// AdminRole has admin specific permissions
AdminRole AccessRole = 110
// CompanyAdminRole can edit company specific things
CompanyAdminRole AccessRole = 120
// LocationAdminRole can edit location specific things
LocationAdminRole AccessRole = 130
// UserRole is a standard user
UserRole AccessRole = 200
)
// Role model
type Role struct {
ID AccessRole `json:"id"`
AccessLevel AccessRole `json:"access_level"`
Name string `json:"name"`
}