group

package
v1.65.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2018 License: AGPL-3.0 Imports: 1 Imported by: 5 modules, 18 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UserHasGroupMembership

func UserHasGroupMembership(r []Record, groupID, userID string) bool

UserHasGroupMembership returns true if user belongs to specified group.

Types

type Group

type Group struct {
	model.BaseEntity
	OrgID   string `json:"orgId"`
	Name    string `json:"name"`
	Purpose string `json:"purpose"`
	Members int    `json:"members"` // read-only info
}

Group defines a user group.

type Member

type Member struct {
	ID        uint64 `json:"id"`
	OrgID     string `json:"orgId"`
	RoleID    string `json:"roleId"`
	UserID    string `json:"userId"`
	Firstname string `json:"firstname"` //read-only info
	Lastname  string `json:"lastname"`  //read-only info
}

Member defines user membership of a user group.

type Record

type Record struct {
	ID      uint64 `json:"id"`
	OrgID   string `json:"orgId"`
	RoleID  string `json:"roleId"`
	UserID  string `json:"userId"`
	Name    string `json:"name"`
	Purpose string `json:"purpose"`
}

Record details user membership of a user group.

func FilterGroupRecords

func FilterGroupRecords(r []Record, groupID string) (m []Record)

FilterGroupRecords returns only those records matching group ID.

Jump to

Keyboard shortcuts

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