mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
* Add extra fields to OSS types to support enterprise * WIP service accounts * Update public/app/features/api-keys/ApiKeysForm.tsx Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com> * Create a service account at the same time as the API key * Use service account credentials when accessing API with APIkey * Throw better error * Use Boolean for "create service account button" * Add GetRole to service, merge RoleDTO and Role structs This patch merges the identical OSS and Enterprise data structures, which improves the code for two reasons: 1. Makes switching between OSS and Enterprise easier 2. Reduces the chance of incompatibilities developing between the same functions in OSS and Enterprise * Start work cloning permissions onto service account * If API key is not linked to a service account, continue login as usual * Fallback to old auth if no service account linked to key * Commented * Add CloneUserToServiceAccount * Update mock.go * Put graphical bits behind a feature toggle * Start adding LinkAPIKeyToServiceAccount * Update pkg/models/user.go Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com> * Update pkg/api/apikey.go Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com> * Update pkg/api/apikey.go Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com> * Finish LinkAPIKeyToServiceAccount * Update comment * Handle api key link error * Update pkg/services/sqlstore/apikey.go Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com> * Feature toggle * Update pkg/services/accesscontrol/accesscontrol.go Co-authored-by: Ieva <ieva.vasiljeva@grafana.com> * Not needed (yet) * Better error messages for OSS accesscontrol * Set an invalid user id as default * ServiceAccountId should be string * Re-arrange field names * ServiceAccountId is integer * Update ossaccesscontrol.go * Linter * Remove fronend edits * Remove console log * Update ApiKeysForm.tsx * feat: add serviceaccount deletion * feat: make sure we do not accidently delete serviceaccount * feat: ServiceAccount Type * refactor: userDeletions function * refactor: serviceaccount deletions\ * refactor: error name and removed attribute for userDeletecommand * refactor:: remove serviceaccount type for now * WIP * add mocked function * Remove unnecessary db query, move to right place * Update pkg/services/accesscontrol/mock/mock.go Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com> * Update pkg/services/accesscontrol/mock/mock.go Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com> * Update pkg/services/accesscontrol/mock/mock.go Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com> * Better error messages * Better and correcter error messages * add mocked function * refactor: move function call, add error msg * add IsServiceAccount and fix table * add service accounts package * WIP * WIP * working serviceaccountsapi registration * WIP tests * test * test working * test running for service * moved the error out of the models package * fixed own review * linting errors * Update pkg/services/serviceaccounts/database/database.go Co-authored-by: Jeremy Price <Jeremy.price@grafana.com> * tests running for api * WIP * WIP * removed unused secrets background svc * removed background svc for serviceaccount infavor or wire.go * serviceaccounts manager tests * wip * Filtering service accounts from the user queries in frontend * clean up * Update pkg/services/sqlstore/org_test.go * methods on same type should have same receiver * _ unused variable and comment * add additional join for results query * remove unused code * remove error fmt * refactor: change to only have false * no new variable to the left hand side * refactor: create serviceaccount cmd * dialect fix Co-authored-by: Jeremy Price <jeremy.price@grafana.com> Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com> Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com> Co-authored-by: Ieva <ieva.vasiljeva@grafana.com> Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com> |
||
---|---|---|
.. | ||
migrations | ||
migrator | ||
permissions | ||
searchstore | ||
sqlutil | ||
alert_notification_test.go | ||
alert_notification.go | ||
alert_test.go | ||
alert.go | ||
annotation_cleanup_test.go | ||
annotation_cleanup.go | ||
annotation_test.go | ||
annotation.go | ||
apikey_test.go | ||
apikey.go | ||
dashboard_acl_test.go | ||
dashboard_acl.go | ||
dashboard_folder_test.go | ||
dashboard_provisioning_test.go | ||
dashboard_provisioning.go | ||
dashboard_snapshot_test.go | ||
dashboard_snapshot.go | ||
dashboard_test.go | ||
dashboard_version_test.go | ||
dashboard_version.go | ||
dashboard.go | ||
database_wrapper.go | ||
datasource_test.go | ||
datasource.go | ||
health_test.go | ||
health.go | ||
logger.go | ||
login_attempt_test.go | ||
login_attempt.go | ||
org_test.go | ||
org_users.go | ||
org.go | ||
playlist_test.go | ||
playlist.go | ||
plugin_setting.go | ||
preferences_test.go | ||
preferences.go | ||
quota_test.go | ||
quota.go | ||
session.go | ||
sqlbuilder_test.go | ||
sqlbuilder.go | ||
sqlstore_test.go | ||
sqlstore.go | ||
sqlstore.goconvey | ||
star.go | ||
stars_test.go | ||
stats_integration_test.go | ||
stats_test.go | ||
stats.go | ||
tables.go | ||
tags_test.go | ||
tags.go | ||
team_test.go | ||
team.go | ||
temp_user_test.go | ||
temp_user.go | ||
tls_mysql.go | ||
transactions_test.go | ||
transactions.go | ||
user_test.go | ||
user.go |