API: Implement defaultACL

This commit is contained in:
Drew DeVault 2022-02-01 09:27:28 +01:00
parent 1e180da72c
commit 8fe8e5a3a3
2 changed files with 4 additions and 2 deletions

View File

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

View File

@ -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) {