Access Control: Fix permission error during dashboard creation flow (#53214)
* remove permission check * remove unneeded function
This commit is contained in:
@@ -72,17 +72,3 @@ func (l *LibraryElementService) requireViewPermissionsOnFolder(ctx context.Conte
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *LibraryElementService) requireEditPermissionsOnDashboard(ctx context.Context, user *models.SignedInUser, dashboardID int64) error {
|
||||
g := guardian.New(ctx, dashboardID, user.OrgId, user)
|
||||
|
||||
canEdit, err := g.CanEdit()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !canEdit {
|
||||
return dashboards.ErrDashboardUpdateAccessDenied
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user