Documentation ¶
Overview ¶
Content managed by Project Forge, see [projectforge.md] for details.
Content managed by Project Forge, see [projectforge.md] for details.
Content managed by Project Forge, see [projectforge.md] for details.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultProfile = &Profile{Name: "Guest"}
View Source
var (
PermissionsLogger util.Logger
)
Functions ¶
func SetPermissions ¶
func SetPermissions(allowDefault bool, ps ...*Permission)
Types ¶
type Account ¶
type Account struct { Provider string `json:"provider"` Email string `json:"email"` Token string `json:"-"` }
func (Account) TitleString ¶ added in v0.6.26
type Accounts ¶
type Accounts []*Account
func AccountsFromString ¶
func (Accounts) GetByProvider ¶
func (Accounts) TitleString ¶ added in v0.6.26
type Permission ¶
type Permission struct { Path string `json:"path"` Match string `json:"match"` Allow bool `json:"allow"` }
func (Permission) Matches ¶
func (p Permission) Matches(path string) bool
func (Permission) String ¶
func (p Permission) String() string
type Permissions ¶
type Permissions []*Permission
func GetPermissions ¶
func GetPermissions() Permissions
func (Permissions) Check ¶
func (p Permissions) Check(path string, accounts Accounts) (bool, string)
func (Permissions) Sort ¶
func (p Permissions) Sort()
Click to show internal directories.
Click to hide internal directories.