mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: remove checks for whether RBAC is disabled (#73812)
* remove checks for whether access control is disabled, as it is always enabled now * linting
This commit is contained in:
@@ -339,16 +339,12 @@ func (r *xormRepositoryImpl) Get(ctx context.Context, query *annotations.ItemQue
|
||||
}
|
||||
}
|
||||
|
||||
var acFilter acFilter
|
||||
if !ac.IsDisabled(r.cfg) {
|
||||
var err error
|
||||
acFilter, err = r.getAccessControlFilter(query.SignedInUser)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
sql.WriteString(fmt.Sprintf(" AND (%s)", acFilter.where))
|
||||
params = append(params, acFilter.whereParams...)
|
||||
acFilter, err := r.getAccessControlFilter(query.SignedInUser)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
sql.WriteString(fmt.Sprintf(" AND (%s)", acFilter.where))
|
||||
params = append(params, acFilter.whereParams...)
|
||||
|
||||
if query.Limit == 0 {
|
||||
query.Limit = 100
|
||||
|
||||
Reference in New Issue
Block a user