auth

package
v0.0.0-...-177b763 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SuperAdmin = 0
	EventAdmin = 1
	GroupAdmin = 2
)

User roles

Variables

This section is empty.

Functions

func ClearUserIDFromCookie

func ClearUserIDFromCookie(c *gin.Context)

ClearUserIDFromCookie clears the userId for the current suer

func GetUserIDFromCookie

func GetUserIDFromCookie(c *gin.Context) uint

GetUserIDFromCookie gets the userId for the current user

func HasAccessToGroup

func HasAccessToGroup(uid uint, groupUUID string, db *gorm.DB) bool

HasAccessToGroup checks if a user is an admin for a group

func IsLoggedIn

func IsLoggedIn(c *gin.Context) bool

IsLoggedIn checks if the current user is logged in

func StoreUserIDInCookie

func StoreUserIDInCookie(c *gin.Context, userID uint)

StoreUserIDInCookie stores the userId for teh current user

Types

This section is empty.

Jump to

Keyboard shortcuts

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