Documentation
¶
Overview ¶
Package viewer contains role definitions for policies
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ViewerContextKey = &ContextKey{"ViewerContextKey"}
ViewerContextKey is the context key for the viewer-context
Functions ¶
Types ¶
type ContextKey ¶
type ContextKey struct {
// contains filtered or unexported fields
}
ContextKey is the key name for the additional context
type UserViewer ¶
type UserViewer struct {
Viewer
GroupID string
OrgID string
// contains filtered or unexported fields
}
UserViewer describes a user-viewer.
func NewUserViewerFromID ¶ added in v0.2.4
func NewUserViewerFromID(id string, hasID bool) *UserViewer
func NewUserViewerFromSubject ¶ added in v0.2.4
func NewUserViewerFromSubject(c context.Context) *UserViewer
func NewUserViewerFromUser ¶ added in v0.2.4
func NewUserViewerFromUser(user *generated.User) *UserViewer
func (UserViewer) GetGroupID ¶
func (u UserViewer) GetGroupID() string
GetGroupID returns the ID of the group
func (UserViewer) GetID ¶ added in v0.2.4
func (u UserViewer) GetID() (string, bool)
func (UserViewer) GetOrganizationID ¶
func (u UserViewer) GetOrganizationID() string
GetOrganizationID returns the ID of the organization.
func (UserViewer) IsAdmin ¶ added in v0.2.4
func (u UserViewer) IsAdmin() bool
Click to show internal directories.
Click to hide internal directories.