mirror of
https://github.com/samuelncui/yatm.git
synced 2026-11-08 04:18:03 +00:00
Unify file queries and Scan execution, retain indexed Identical results, improve Job and Preview workflows, and verify release packaging.
21 lines
583 B
Go
21 lines
583 B
Go
package executor
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/samuelncui/yatm/entity"
|
|
)
|
|
|
|
func (e *Executor) AccessSettings(ctx context.Context) (*entity.GetLocationAccessResponse, error) {
|
|
// Expose administrator rules without promoting them to editable Location configuration.
|
|
reply := &entity.GetLocationAccessResponse{}
|
|
for _, access := range e.AccessRanges() {
|
|
canonical, err := CanonicalConfiguredPath(access.Root)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
reply.Ranges = append(reply.Ranges, &entity.AccessRange{RootPath: canonical, Ignore: access.Ignore})
|
|
}
|
|
return reply, nil
|
|
}
|