feat: more role backend and admin/writer roles additions and adjustments
This commit is contained in:
1 parent
8c6c6456da
commit
de142f6c5f
131 files changed
+2663
-435
No files matched your search
@@ -26,6 +26,7 @@ type activityProbeRepo struct {
|
||||
deleteErr error
|
||||
deleteCalls int
|
||||
readErr error
|
||||
maxReads int
|
||||
sizeErr error
|
||||
sizeBytes *int64
|
||||
oldestErr error
|
||||
@@ -47,6 +48,9 @@ func (p *activityProbeRepo) Append(event audit.Event) (audit.Event, error) {
|
||||
func (p *activityProbeRepo) List(filter audit.Filter) (audit.Page, error) {
|
||||
p.reads++
|
||||
p.listCalls = append(p.listCalls, filter)
|
||||
if p.maxReads > 0 && p.reads > p.maxReads {
|
||||
return audit.Page{}, errors.New("read budget exceeded")
|
||||
}
|
||||
if p.readErr != nil {
|
||||
return audit.Page{}, p.readErr
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user