Back to godoc.org
github.com/documize/community / model / group

package group

v3.2.0+incompatible
Latest Go to latest
Published: Aug 29, 2019 | License: AGPL-3.0 | Module: github.com/documize/community

Index

func UserHasGroupMembership

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

UserHasGroupMembership returns true if user belongs to specified group.

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"`
	GroupID   string `json:"groupId"`
	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"`
	GroupID string `json:"groupId"`
	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.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier