mirror of
https://github.com/grafana/grafana.git
synced 2025-07-28 17:02:19 +08:00

* [WIP] Lift RBAC from xorm store * Cleanup RBAC, fix tests * Use the scope type map as a map * Remove dependency on dashboard service * Make dashboards a map for constant time lookups (useful later) --- * Lift RBAC tests into a new file to test at service level * Add necessary access resource structs to xorm store tests * Move authorization into separate service * Pass features to searchstore.Builder * Sort imports * Code cleanup * Remove useless scope type check * Lift permission check into `Authorize()` * Use clearer language when checking scope types * Include dashboard permissions in test to ensure they're ignored * Switch to errutil * Cleanup sql.Cfg refs
9 lines
138 B
Go
9 lines
138 B
Go
package annotationsimpl
|
|
|
|
import "time"
|
|
|
|
var (
|
|
// timeNow is an equivalent time.Now() that can be replaced in tests
|
|
timeNow = time.Now
|
|
)
|