grafana/pkg/api
Gabriel MABILLE bf49c20050
RBAC: Add an endpoint to list all user permissions (#57644)
* RBAC: Add an endpoint to see all user permissions

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>

* Fix mock

* Add feature flag

* Fix merging

* Return normal permissions instead of simplified ones

* Fix test

* Fix tests

* Fix tests

* Create benchtests

* Split function to get basic roles

* Comments

* Reorg

* Add two more tests to the bench

* bench comment

* Re-ran the test

* Rename GetUsersPermissions to SearchUsersPermissions and prepare search options

* Remove from model unused struct

* Start adding option to get permissions by Action+Scope

* Wrong import

* Action and Scope

* slightly tweak users permissions actionPrefix query param validation logic

* Fix xor check

* Lint

* Account for suggeston

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* Add search

* Remove comment on global scope

* use union all and update test to make it run on all dbs

* Fix MySQL needs a space

* Account for suggestion.

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
2022-11-30 15:38:49 +01:00
..
apierrors Chore: Fix status codes for nested folders (#59087) 2022-11-22 16:06:39 +02:00
avatar
datasource
dtos Nested Folders: Some API fixes (#59298) 2022-11-24 08:59:47 -05:00
frontendlogging Performance: add preallocation for some slice/map (#57860) 2022-11-22 20:24:36 +08:00
pluginproxy Chore: Refactor quota service (#58643) 2022-11-14 21:08:10 +02:00
response
routing
static
accesscontrol.go NavTree: Refactor out the navtree building from api/index.go and into it's own service (#55552) 2022-09-22 22:04:48 +02:00
admin_encryption.go manager exposes renderer + secrets manager (#54629) 2022-09-02 14:20:10 +02:00
admin_provisioning_test.go
admin_provisioning.go
admin_test.go
admin_users_test.go Login: Remove CreateUser from LoginService (#59464) 2022-11-29 10:20:44 +01:00
admin_users.go Login: Remove CreateUser from LoginService (#59464) 2022-11-29 10:20:44 +01:00
admin.go
alerting.go Chore: fix formating for swagger definitions (#54993) 2022-09-12 10:40:35 +03:00
annotations_test.go Chore: Reduce the usage of sqlstore.createorg and use orgservice instead (#59356) 2022-11-28 12:05:46 +01:00
annotations.go Annotation: Optionally allow storing longer annotation tags (#54754) 2022-09-23 06:04:41 -04:00
api.go Admin: Combine org and admin user pages (#59365) 2022-11-30 15:24:53 +02:00
apikey.go Chore: fix formating for swagger definitions (#54993) 2022-09-12 10:40:35 +03:00
basic_auth_test.go
basic_auth.go
comments.go
common_test.go RBAC: Add an endpoint to list all user permissions (#57644) 2022-11-30 15:38:49 +01:00
dashboard_permission_test.go
dashboard_permission.go Perfomance: add preallocation for some slices (#59263) 2022-11-28 13:10:24 +01:00
dashboard_snapshot_test.go Chore: Switch over to team.Service instead of sqlstore (#55497) 2022-09-20 18:58:04 +02:00
dashboard_snapshot.go Fix: Allow creating snapshot with no dashboard id (#58669) 2022-11-29 09:29:27 +01:00
dashboard_test.go Access Control: Clear user's permission cache after resource creation (#59101) 2022-11-24 14:38:55 +00:00
dashboard.go Access Control: Clear user's permission cache after resource creation (#59101) 2022-11-24 14:38:55 +00:00
dataproxy.go
datasources_test.go Access Control: Clear user's permission cache after resource creation (#59101) 2022-11-24 14:38:55 +00:00
datasources.go Access Control: Clear user's permission cache after resource creation (#59101) 2022-11-24 14:38:55 +00:00
fakes.go NavTree: Make it possible to configure where in nav tree plugins live (#55484) 2022-09-28 08:29:35 +02:00
folder_permission_test.go API: Support creating a nested folder (#58508) 2022-11-10 04:41:03 -05:00
folder_permission.go Perfomance: add preallocation for some slices (#59263) 2022-11-28 13:10:24 +01:00
folder_test.go Access Control: Clear user's permission cache after resource creation (#59101) 2022-11-24 14:38:55 +00:00
folder.go Access Control: Clear user's permission cache after resource creation (#59101) 2022-11-24 14:38:55 +00:00
frontend_logging_test.go Frontend logging: handle logging endpoints without expensive middleware (#54960) 2022-09-12 13:04:43 +03:00
frontend_logging.go Frontend logging: handle logging endpoints without expensive middleware (#54960) 2022-09-12 13:04:43 +03:00
frontend_metrics.go
frontendsettings_test.go OAuth: Refactor OAuth parameters handling to support obtaining refresh tokens for Google OAuth (#58782) 2022-11-18 10:12:17 +01:00
frontendsettings.go Auth: Add expiry date for service accounts access tokens (#58885) 2022-11-22 10:08:40 +01:00
grafana_com_proxy.go
health_test.go
health.go
http_server_test.go
http_server.go Auth: Remove userauth service (#58941) 2022-11-18 14:40:26 +01:00
index.go Internationalization: Change locale preference to language (#58359) 2022-11-22 12:18:34 +00:00
ldap_debug_test.go Auth: Refactor auth package (#58920) 2022-11-18 09:56:06 +01:00
ldap_debug.go Chore: Move SearchOrgs to org service (#55416) 2022-09-20 09:55:40 +02:00
login_oauth_test.go OAuth: Refactor OAuth parameters handling to support obtaining refresh tokens for Google OAuth (#58782) 2022-11-18 10:12:17 +01:00
login_oauth.go OAuth: Refactor OAuth parameters handling to support obtaining refresh tokens for Google OAuth (#58782) 2022-11-18 10:12:17 +01:00
login_test.go Auth: Refactor auth package (#58920) 2022-11-18 09:56:06 +01:00
login.go Auth: Refactor auth package (#58920) 2022-11-18 09:56:06 +01:00
metrics_test.go Chore: Refactor quota service (#58643) 2022-11-14 21:08:10 +02:00
metrics.go Datasources: Support mixed datasources in a single query (#56832) 2022-10-14 10:27:06 -04:00
openapi3.go
org_invite_test.go SQLStore: Make addOrgUser private (#59142) 2022-11-22 17:02:39 +00:00
org_invite.go Login: Remove CreateUser from LoginService (#59464) 2022-11-29 10:20:44 +01:00
org_test.go Chore: Reduce the usage of sqlstore.createorg and use orgservice instead (#59356) 2022-11-28 12:05:46 +01:00
org_users_test.go RBAC: Add an endpoint to list all user permissions (#57644) 2022-11-30 15:38:49 +01:00
org_users.go Auth: Display id Provider label in orgs/users view (#58033) 2022-11-29 15:20:28 +01:00
org.go Remove org methods from sqlstore interface (#56358) 2022-10-05 15:47:56 +02:00
password.go LoginAttempts: Reset attempts on successfull password reset (#59215) 2022-11-23 16:57:18 +01:00
playlist_play.go Playlist: update service so it supports both read+write (#55959) 2022-10-04 11:11:18 -04:00
playlist.go Playlist: update service so it supports both read+write (#55959) 2022-10-04 11:11:18 -04:00
plugin_dashboards_test.go Chore: Refactor quota service (#58643) 2022-11-14 21:08:10 +02:00
plugin_dashboards.go
plugin_metrics_test.go
plugin_metrics.go
plugin_proxy_test.go Plugins: Handle app plugin proxy routes per request (#51835) 2022-08-23 13:05:31 +02:00
plugin_proxy.go Plugins: Handle app plugin proxy routes per request (#51835) 2022-08-23 13:05:31 +02:00
plugin_resource.go Plugins: CallResource: Use canonical MIME headers when writing response (#58506) 2022-11-09 15:47:32 +01:00
plugins_test.go Chore: Refactor quota service (#58643) 2022-11-14 21:08:10 +02:00
plugins.go Plugins: Make "README" the default markdown request param (#58264) 2022-11-07 11:16:17 +01:00
preferences_test.go Chore: Reduce the usage of sqlstore.createorg and use orgservice instead (#59356) 2022-11-28 12:05:46 +01:00
preferences.go Internationalization: Change locale preference to language (#58359) 2022-11-22 12:18:34 +00:00
quota_test.go Chore: Refactor quota service (#58643) 2022-11-14 21:08:10 +02:00
quota.go Chore: Refactor quota service (#58643) 2022-11-14 21:08:10 +02:00
render.go
search_test.go RBAC: Enable rbac when creating new settings (#53531) 2022-08-11 15:37:31 +02:00
search.go Chore: fix formating for swagger definitions (#54993) 2022-09-12 10:40:35 +03:00
short_url_test.go
short_url.go
signup.go Login: Remove CreateUser from LoginService (#59464) 2022-11-29 10:20:44 +01:00
stars.go Star: Add uid in the endpoint (#54340) 2022-10-05 22:32:49 +02:00
swagger_responses.go
swagger_tags.json
swagger.go
team_members_test.go Chore: Reduce the usage of sqlstore.createorg and use orgservice instead (#59356) 2022-11-28 12:05:46 +01:00
team_members.go Chore: Switch over to team.Service instead of sqlstore (#55497) 2022-09-20 18:58:04 +02:00
team_test.go Access Control: Clear user's permission cache after resource creation (#59101) 2022-11-24 14:38:55 +00:00
team.go Access Control: Clear user's permission cache after resource creation (#59101) 2022-11-24 14:38:55 +00:00
user_test.go Chore: Refactor quota service (#58643) 2022-11-14 21:08:10 +02:00
user_token_test.go Auth: Refactor auth package (#58920) 2022-11-18 09:56:06 +01:00
user_token.go Auth: Refactor auth package (#58920) 2022-11-18 09:56:06 +01:00
user.go Fix: Email and username trimming and invitation validation (#58442) 2022-11-14 13:11:26 +01:00
utils.go Fix: Email and username trimming and invitation validation (#58442) 2022-11-14 13:11:26 +01:00