Documentation
¶
Index ¶
- type AuthUser
- func (u *AuthUser) Bytes() (data []byte)
- func (u *AuthUser) Can(actions ...feature.Action) (allowed bool)
- func (u *AuthUser) CanAll(actions ...feature.Action) (allowed bool)
- func (u *AuthUser) GetActions() (actions feature.Actions)
- func (u *AuthUser) GetActive() (active bool)
- func (u *AuthUser) GetAdminLocked() (locked bool)
- func (u *AuthUser) GetEID() (eid string)
- func (u *AuthUser) GetEmail() (email string)
- func (u *AuthUser) GetGroups() (groups feature.Groups)
- func (u *AuthUser) GetImage() (image string)
- func (u *AuthUser) GetName() (name string)
- func (u *AuthUser) GetOrigin() (origin string)
- func (u *AuthUser) GetRID() (rid string)
- func (u *AuthUser) GetSetting(key string) (value interface{})
- func (u *AuthUser) GetSettings(limitKeys ...string) (settings context.Context)
- func (u *AuthUser) IsVisitor() (visitor bool)
- func (u *AuthUser) SafeContext(includeKeys ...string) (ctx context.Context)
- func (u *AuthUser) UnsafeContext() (ctx context.Context)
- type User
- func (u *User) AsPage() feature.Page
- func (u *User) Can(actions ...feature.Action) (allowed bool)
- func (u *User) CanAll(actions ...feature.Action) (allowed bool)
- func (u *User) FilteredContext(includeKeys ...string) (ctx context.Context)
- func (u *User) GetActions() (actions feature.Actions)
- func (u *User) GetGroups() (groups feature.Groups)
- func (u *User) GetOrigin() (origin string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthUser ¶
type AuthUser struct {
RID string `json:"real-id"`
EID string `json:"enjin-id"`
Name string `json:"name"`
Email string `json:"email"`
Image string `json:"image"`
Origin string `json:"origin"`
Groups feature.Groups `json:"groups"`
Actions feature.Actions `json:"actions"`
Context context.Context `json:"context"`
Active bool `json:"active"`
AdminLocked bool `json:"admin-locked"`
}
func NewAuthUser ¶
func (*AuthUser) GetActions ¶
func (*AuthUser) GetAdminLocked ¶
func (*AuthUser) GetSetting ¶
func (*AuthUser) GetSettings ¶
func (*AuthUser) SafeContext ¶
func (*AuthUser) UnsafeContext ¶
type User ¶
type User struct {
page.CPage
AuthUser
Origin string `json:"origin"`
Groups feature.Groups `json:"-"`
Actions feature.Actions `json:"-"`
}
func NewUserFromPageMatter ¶
func NewUserFromPageMatter(user *AuthUser, pm *matter.PageMatter, formats feature.PageFormatProvider, enjin context.Context) (u *User, err error)
func (*User) FilteredContext ¶
func (*User) GetActions ¶
Click to show internal directories.
Click to hide internal directories.