access

package
v0.0.0-...-20da8eb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2019 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminRepo

func AdminRepo() string

func AdminRepoPath

func AdminRepoPath() string

func CanInit

func CanInit(user, repo string) bool

func CanRead

func CanRead(user, repo string) bool

func CanWrite

func CanWrite(user, repo string) bool

func HgwebConfigPath

func HgwebConfigPath() string

func Refresh

func Refresh() error

Refresh will try to reload the casbin model and policies followed by SSH keys. If there is an error it's possible that the casbin model and polcies could have been updated but the ssh keys were not.

func Setup

func Setup(repositoriesPath, adminRepo string) error

func Teardown

func Teardown()

func UsernameFromFingerprint

func UsernameFromFingerprint(fingerprint string) (string, error)

UsernameFromFingerprint looks up a username from an SSH key's fingerprint and returns the username if found, or err if not found.

func UsernameFromPubkey

func UsernameFromPubkey(pubkey ssh.PublicKey) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL