collection

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Allways

func Allways(ctx context.Context, ds *datastore.Request, mperms *perm.MeetingPermission, elementID int) (bool, error)

Allways is a restricter func that just returns true.

Types

type AgendaItem

type AgendaItem struct{}

AgendaItem handels permission for the agenda.

func (AgendaItem) Modes

func (a AgendaItem) Modes(mode string) FieldRestricter

Modes returns a map from all known modes to there restricter.

type Assignment

type Assignment struct{}

Assignment handels restrictions for the assignment collection.

func (Assignment) Modes

func (a Assignment) Modes(mode string) FieldRestricter

Modes returns the restricter for the a restriction mode.

type AssignmentCandidate

type AssignmentCandidate struct{}

AssignmentCandidate handels the permissions for assignment_candiate collections.

func (AssignmentCandidate) Modes

Modes returns the restrictions modes for assignment_candidate.

type ChatGroup

type ChatGroup struct{}

ChatGroup handels restrictions for the collection chat_group.

func (ChatGroup) Modes

func (c ChatGroup) Modes(mode string) FieldRestricter

Modes give sthe FieldRestricter for a restriction_mode.

type ChatMessage

type ChatMessage struct{}

ChatMessage handels restrictions for the collection chat_message.

func (ChatMessage) Modes

func (c ChatMessage) Modes(mode string) FieldRestricter

Modes give sthe FieldRestricter for a restriction_mode.

type Committee

type Committee struct{}

Committee handels permission for committees.

func (Committee) Modes

func (a Committee) Modes(mode string) FieldRestricter

Modes returns a map from all known modes to there restricter.

type FieldRestricter

type FieldRestricter func(ctx context.Context, ds *datastore.Request, mperms *perm.MeetingPermission, id int) (bool, error)

FieldRestricter is a function to restrict fields of a collection.

type Group

type Group struct{}

Group handels restrictions of the collection group.

func (Group) Modes

func (g Group) Modes(mode string) FieldRestricter

Modes returns the field restricters for the collection group.

type ListOfSpeakers

type ListOfSpeakers struct{}

ListOfSpeakers handels the restriction for the list_of_speakers collection.

func (ListOfSpeakers) Modes

func (los ListOfSpeakers) Modes(mode string) FieldRestricter

Modes returns the restrictions modes for the meeting collection.

type Mediafile

type Mediafile struct{}

Mediafile handels permissions for the collection mediafile.

func (Mediafile) Modes

func (m Mediafile) Modes(mode string) FieldRestricter

Modes returns the field modes for the collection mediafile.

type Meeting

type Meeting struct{}

Meeting handels restrictions of the collection meeting.

func (Meeting) Modes

func (m Meeting) Modes(mode string) FieldRestricter

Modes returns the restrictions modes for the meeting collection.

type Motion

type Motion struct{}

Motion handels restrictions of the collection motion.

func (Motion) Modes

func (m Motion) Modes(mode string) FieldRestricter

Modes returns the restrictions modes for the meeting collection.

type MotionBlock

type MotionBlock struct{}

MotionBlock handels restrictions of the collection motion_block.

func (MotionBlock) Modes

func (m MotionBlock) Modes(mode string) FieldRestricter

Modes returns the restrictions modes for the meeting collection.

type MotionCategory

type MotionCategory struct{}

MotionCategory handels restrictions of the collection motion_category.

func (MotionCategory) Modes

func (m MotionCategory) Modes(mode string) FieldRestricter

Modes returns the restrictions modes for the meeting collection.

type MotionChangeRecommendation

type MotionChangeRecommendation struct{}

MotionChangeRecommendation handels restrictions of the collection motion_change_recommendation.

func (MotionChangeRecommendation) Modes

Modes returns the restrictions modes for the meeting collection.

type MotionComment

type MotionComment struct{}

MotionComment handels restrictions of the collection motion_comment.

func (MotionComment) Modes

func (m MotionComment) Modes(mode string) FieldRestricter

Modes returns the restrictions modes for the meeting collection.

type MotionCommentSection

type MotionCommentSection struct{}

MotionCommentSection handels restrictions of the collection motion_comment_section.

func (MotionCommentSection) Modes

Modes returns the restrictions modes for the meeting collection.

type MotionState

type MotionState struct{}

MotionState handels restrictions of the collection motion_state.

func (MotionState) Modes

func (m MotionState) Modes(mode string) FieldRestricter

Modes returns the restrictions modes for the meeting collection.

type MotionStatuteParagraph

type MotionStatuteParagraph struct{}

MotionStatuteParagraph handels restrictions of the collection motion_statute_paragraph.

func (MotionStatuteParagraph) Modes

Modes returns the restrictions modes for the meeting collection.

type MotionSubmitter

type MotionSubmitter struct{}

MotionSubmitter handels restrictions of the collection motion_submitter.

func (MotionSubmitter) Modes

func (m MotionSubmitter) Modes(mode string) FieldRestricter

Modes returns the restrictions modes for the meeting collection.

type MotionWorkflow

type MotionWorkflow struct{}

MotionWorkflow handels restrictions of the collection motion_workflow.

func (MotionWorkflow) Modes

func (m MotionWorkflow) Modes(mode string) FieldRestricter

Modes returns the restrictions modes for the meeting collection.

type Option

type Option struct{}

Option handels restrictions of the collection option.

func (Option) Modes

func (o Option) Modes(mode string) FieldRestricter

Modes returns the restrictions modes for the meeting collection.

type Organization

type Organization struct{}

Organization handels restrictions of the collection organization.

func (Organization) Modes

func (o Organization) Modes(mode string) FieldRestricter

Modes returns the restrictions modes for the meeting collection.

type OrganizationTag

type OrganizationTag struct{}

OrganizationTag handels restrictions of the collection organization_tag.

func (OrganizationTag) Modes

func (o OrganizationTag) Modes(mode string) FieldRestricter

Modes returns the restrictions modes for the meeting collection.

type PersonalNote

type PersonalNote struct{}

PersonalNote handels restriction for the personal_node collection

func (PersonalNote) Modes

func (p PersonalNote) Modes(mode string) FieldRestricter

Modes returns the field restriction for each mode.

func (PersonalNote) SuperAdmin

func (p PersonalNote) SuperAdmin(mode string) FieldRestricter

SuperAdmin restricts the super admin.

type Poll

type Poll struct{}

Poll handels restrictions of the collection poll.

func (Poll) Modes

func (m Poll) Modes(mode string) FieldRestricter

Modes returns the restrictions modes for the meeting collection.

type Projection

type Projection struct{}

Projection handels the restriction for the projection collection.

func (Projection) Modes

func (p Projection) Modes(mode string) FieldRestricter

Modes returns the restrictions modes for the meeting collection.

type Projector

type Projector struct{}

Projector handels the restriction for the projector collection.

func (Projector) Modes

func (p Projector) Modes(mode string) FieldRestricter

Modes returns the restrictions modes for the meeting collection.

type ProjectorCountdown

type ProjectorCountdown struct{}

ProjectorCountdown handels the restriction for the projector_countdown collection.

func (ProjectorCountdown) Modes

Modes returns the restrictions modes for the meeting collection.

type ProjectorMessage

type ProjectorMessage struct{}

ProjectorMessage handels the restriction for the projector_message collection.

func (ProjectorMessage) Modes

func (p ProjectorMessage) Modes(mode string) FieldRestricter

Modes returns the restrictions modes for the meeting collection.

type Resource

type Resource struct{}

Resource handels restrictions of the collection resource.

func (Resource) Modes

func (r Resource) Modes(mode string) FieldRestricter

Modes returns the restrictions modes for the meeting collection.

type Restricter

type Restricter interface {
	Modes(mode string) FieldRestricter
}

Restricter returns a fieldRestricter for a restriction_mode.

The FieldRestricter is a function that tells, if a user can see fields in that mode.

func Collection

func Collection(collection string) Restricter

Collection returns the restricter for a collection

type Speaker

type Speaker struct{}

Speaker handels restrictions of the collection speaker.

func (Speaker) Modes

func (s Speaker) Modes(mode string) FieldRestricter

Modes returns the restrictions modes for the meeting collection.

type Tag

type Tag struct{}

Tag handels the restrictions for the tag collection.

func (Tag) Modes

func (t Tag) Modes(mode string) FieldRestricter

Modes returns the field restriction for each mode.

type Theme

type Theme struct{}

Theme handels the restrictions for the theme collection.

func (Theme) Modes

func (t Theme) Modes(mode string) FieldRestricter

Modes returns the field restriction for each mode.

type Topic

type Topic struct{}

Topic handels the restrictions for the topic collection.

func (Topic) Modes

func (t Topic) Modes(mode string) FieldRestricter

Modes returns the field restriction for each mode.

type User

type User struct{}

User handels the restrictions for the user collection.

func (User) Modes

func (u User) Modes(mode string) FieldRestricter

Modes returns the field restriction for each mode.

func (User) SuperAdmin

func (u User) SuperAdmin(mode string) FieldRestricter

SuperAdmin restricts the super admin.

type Vote

type Vote struct{}

Vote handels restrictions of the collection vote.

func (Vote) Modes

func (v Vote) Modes(mode string) FieldRestricter

Modes returns the restrictions modes for the meeting collection.

Jump to

Keyboard shortcuts

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