mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 23:53:10 +08:00
Folders: Add admin permissions upon creation of a folder w. SA (#95072)
* add admin permissions upon creation of a folder w. SA * Update pkg/services/folder/folderimpl/folder.go Co-authored-by: Karl Persson <kalle.persson@grafana.com> * Grant service account permissions for creation of dashboards * Grant service account admin permissions upon creating a datasource * fetch user using the userservice with the userid * Revert "fetch user using the userservice with the userid" This reverts commit 23cba787523dcff373a4b4d3d90d5f2ae923cd8b. * revert back to original datasource creation --------- Co-authored-by: Karl Persson <kalle.persson@grafana.com>
This commit is contained in:
@ -713,7 +713,7 @@ func (s *Service) setDefaultFolderPermissions(ctx context.Context, orgID int64,
|
||||
|
||||
var permissions []accesscontrol.SetResourcePermissionCommand
|
||||
|
||||
if user.IsIdentityType(claims.TypeUser) {
|
||||
if user.IsIdentityType(claims.TypeUser, claims.TypeServiceAccount) {
|
||||
userID, err := user.GetInternalID()
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user