package equipo import ( "amadan.net/oficina/equipo/internal/equipo/library" "gorm.io/gorm" ) type SpecialistInput = library.SpecialistInput type ModelRef = library.ModelRef type TemplateRef = library.TemplateRef type TemplateDiff = library.TemplateDiff type PlaybookInput = library.PlaybookInput type Playbook = library.Playbook func (s *Store) libraryAt(tx *gorm.DB) *library.Store { return library.New(tx, library.Dependencies{ Authorize: func(tx *gorm.DB, a Actor) (library.Access, error) { m, err := currentRunnerMember(tx, a.Address) if err != nil { return library.Access{}, err } var t Team err = tx.First(&t).Error return library.Access{TeamID: t.ID, Owner: m.Role == RoleOwner}, err }, TaskAccess: func(tx *gorm.DB, a Actor, id int64) error { _, err := bugAuthority(tx, a, id); return err }, Audit: appendAudit, Copy: copyText, Catalog: library.Catalog, Referenced: library.UnstartedReference, Invalid: ErrInvalid, Forbidden: ErrForbidden, NotFound: ErrNotFound, Conflict: ErrConflict, }) }