Documentation ¶
Index ¶
- Constants
- Variables
- func AppendCurrentPermissions(r *http.Request, actions ...feature.Action) (modified *http.Request)
- func CurrentUserCan(r *http.Request, actions ...feature.Action) (allow bool)
- func CurrentUserCanAll(r *http.Request, actions ...feature.Action) (allow bool)
- func GetCurrentEID(r *http.Request) (eid string)
- func GetCurrentPermissions(r *http.Request) (actions feature.Actions)
- func GetCurrentUser(r *http.Request) (u feature.User)
- func IsUserActive(au feature.User) (active bool)
- func IsValidEID(eid string) (valid bool)
- func IsVisitor(r *http.Request) (visiting bool)
- func RequireUserCan(enjin feature.Internals, actions ...feature.Action) func(next http.Handler) http.Handler
- func RequireUserCanAll(enjin feature.Internals, actions ...feature.Action) func(next http.Handler) http.Handler
- func SetCurrentPermissions(r *http.Request, actions ...feature.Action) (modified *http.Request)
- func SetCurrentUser(u feature.User, r *http.Request) (m *http.Request)
Constants ¶
Variables ¶
View Source
var ( VisitorEID = "visitor" VisitorName = "Visitor" UsersGroup feature.Group = "users" PublicGroup feature.Group = "public" UserActiveKey = "user-active" UserAdminLockedKey = "user-admin-locked" )
Functions ¶
func AppendCurrentPermissions ¶ added in v0.5.0
func CurrentUserCan ¶ added in v0.5.0
func CurrentUserCanAll ¶ added in v0.5.0
func GetCurrentEID ¶ added in v0.5.0
func GetCurrentPermissions ¶ added in v0.5.0
func IsUserActive ¶ added in v0.5.0
func IsValidEID ¶ added in v0.5.0
func RequireUserCan ¶ added in v0.5.0
func RequireUserCanAll ¶ added in v0.5.0
func SetCurrentPermissions ¶ added in v0.5.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.