Documentation ¶
Index ¶
- Constants
- type AccessMode
- type Permission
- type Role
- type Scope
- type Session
- func (s *Session) GetAclRoles() []int64
- func (s *Session) GetDomainId() int64
- func (s *Session) GetScope(scopeName string) *Scope
- func (s *Session) GetUser() *User
- func (s *Session) GetUserId() int64
- func (s *Session) GetUserName() string
- func (s *Session) HasObacAccess(scopeName string, accessType AccessMode) bool
- func (s *Session) HasPermission(permissionName string) bool
- func (s *Session) HasScope(scopeName string) bool
- func (s *Session) IsExpired() bool
- type User
Constants ¶
View Source
const ( AuthTokenName = "X-Webitel-Access" RequestContextName = "grpc_ctx" )
View Source
const ( SuperSelectPermission = "read" SuperEditPermission = "write" SuperCreatePermission = "add" SuperDeletePermission = "delete" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessMode ¶
type AccessMode uint8
const ( Delete AccessMode = 1 << iota Edit Read Add NONE AccessMode = 0 FULL = Add | Read | Edit | Delete )
func (AccessMode) Value ¶
func (a AccessMode) Value() uint8
type Permission ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) GetAclRoles ¶
func (*Session) GetDomainId ¶
func (*Session) GetUserName ¶
func (*Session) HasObacAccess ¶
func (s *Session) HasObacAccess(scopeName string, accessType AccessMode) bool
func (*Session) HasPermission ¶
Click to show internal directories.
Click to hide internal directories.