* remove permission check
* remove unneeded function
(cherry picked from commit 610abc2af0)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
This commit is contained in:
co-authored by
Ieva
parent
b28a11e1b4
commit
447a2d4d82
@@ -648,10 +648,6 @@ func (l *LibraryElementService) getElementsForDashboardID(c context.Context, das
|
||||
|
||||
// connectElementsToDashboardID adds connections for all elements Library Elements in a Dashboard.
|
||||
func (l *LibraryElementService) connectElementsToDashboardID(c context.Context, signedInUser *models.SignedInUser, elementUIDs []string, dashboardID int64) error {
|
||||
if err := l.requireEditPermissionsOnDashboard(c, signedInUser, dashboardID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err := l.SQLStore.WithTransactionalDbSession(c, func(session *sqlstore.DBSession) error {
|
||||
_, err := session.Exec("DELETE FROM "+models.LibraryElementConnectionTableName+" WHERE kind=1 AND connection_id=?", dashboardID)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user