* Chore(deps): Bump xorm.io/xorm from 0.8.1 to 0.8.2
Bumps xorm.io/xorm from 0.8.1 to 0.8.2.
Signed-off-by: dependabot[bot] <support@github.com>
* Fix limit for snapshots
* Fix limit for org and users
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Allow API to assign new user to a specific organization
* Add defer block to test
* Add API tests and return 400 instead of 500 for bad orgId
* Minor test improvements
Adds a new setting disable_admin_user and when true the default
admin user will not be created when Grafana starts for the first
time (or no users exists in the system).
Closes#19038
* Move the ReloadLDAPCfg function to the debug file
Appears to be a better suite place for this.
* LDAP: Return the server information when we find a specific user
We allow you to specify multiple LDAP servers as part of LDAP authentication integration. As part of searching for specific users, we need to understand from which server they come from. Returning the server configuration as part of the search will help us do two things:
- Understand in which server we found the user
- Have access the groups specified as part of the server configuration
* LDAP: Adds the /api/admin/ldap/:username endpoint
This endpoint returns a user found within the configured LDAP server(s). Moreso, it provides the mapping information for the user to help administrators understand how the users would be created within Grafana based on the current configuration.
No changes are executed or saved to the database, this is all an in-memory representation of how the final result would look like.
See,
$ gometalinter --vendor --disable-all --enable=megacheck --disable=gotype --deadline 6m ./... | grep ID
alert.go:193:15⚠️ sess.Id is deprecated: use ID instead (SA1019) (megacheck)
alert.go:252:18⚠️ sess.Id is deprecated: use ID instead (SA1019) (megacheck)
annotation.go:113:12⚠️ sess.Table("annotation").Id is deprecated: use ID instead (SA1019) (megacheck)
org.go:136:24⚠️ sess.Id is deprecated: use ID instead (SA1019) (megacheck)
org.go:169:16⚠️ sess.Id is deprecated: use ID instead (SA1019) (megacheck)
org_users.go:24:21⚠️ sess.Id is deprecated: use ID instead (SA1019) (megacheck)
org_users.go:88:12⚠️ sess.Id is deprecated: use ID instead (SA1019) (megacheck)
org_users.go:141:21⚠️ sess.Id is deprecated: use ID instead (SA1019) (megacheck)
plugin_setting.go:103:12⚠️ sess.Id is deprecated: use ID instead (SA1019) (megacheck)
preferences.go:97:12⚠️ sess.Id is deprecated: use ID instead (SA1019) (megacheck)
quota.go:119:17⚠️ sess.Id is deprecated: use ID instead (SA1019) (megacheck)
quota.go:221:17⚠️ sess.Id is deprecated: use ID instead (SA1019) (megacheck)
team.go:77:24⚠️ sess.Id is deprecated: use ID instead (SA1019) (megacheck)
user.go:243:16⚠️ sess.Id is deprecated: use ID instead (SA1019) (megacheck)
user.go:267:13⚠️ sess.Id is deprecated: use ID instead (SA1019) (megacheck)
user.go:282:13⚠️ sess.Id is deprecated: use ID instead (SA1019) (megacheck)
user.go:313:12⚠️ sess.Id is deprecated: use ID instead (SA1019) (megacheck)
user.go:475:3⚠️ sess.Id is deprecated: use ID instead (SA1019) (megacheck)
user.go:479:13⚠️ sess.Id is deprecated: use ID instead (SA1019) (megacheck)
user.go:493:13⚠️ sess.Id is deprecated: use ID instead (SA1019) (megacheck)