API: Implement defaultACL

writable-api
Drew DeVault 1 year ago
parent 1e180da72c
commit 8fe8e5a3a3

@ -34,7 +34,7 @@ type Tracker struct {
OwnerID int
Access int
DefaultAccess int
DefaultAccess uint
ACLID *int
alias string

@ -1875,7 +1875,9 @@ func (r *trackerResolver) ACL(ctx context.Context, obj *model.Tracker) (model.AC
}
func (r *trackerResolver) DefaultACL(ctx context.Context, obj *model.Tracker) (*model.DefaultACL, error) {
panic(fmt.Errorf("not implemented")) // TODO
acl := &model.DefaultACL{}
acl.SetBits(obj.DefaultAccess)
return acl, nil
}
func (r *trackerResolver) Acls(ctx context.Context, obj *model.Tracker, cursor *coremodel.Cursor) (*model.ACLCursor, error) {

Loading…
Cancel
Save