3
0
Files
corteza/internal/rules/interfaces.go
Tit Petric 876a304def upd(all):
- moved Access type from system to internal/rules,
- moved Resource from system to internal/rules,
- update imports for new type locations,
- add scope list container to inject permissions,
- update permissions API call to return default perms,
- update codegen for generated Rules types
2019-02-06 11:19:32 +01:00

18 lines
427 B
Go

package rules
import (
"context"
"github.com/titpetric/factory"
)
type ResourcesInterface interface {
With(ctx context.Context, db *factory.DB) ResourcesInterface
CheckAccessMulti(resource string, operation string) error
CheckAccess(resource string, operation string) error
Grant(resource string, teamID uint64, operations []string, value Access) error
ListGrants(resource string, teamID uint64) ([]Rules, error)
}