[v11.3.x] Folders: Correctly show new folder button under root folder (#94713)
Folders: Correctly show new folder button under root folder (#94687)
show new folder button under root folder if nested folders are disabled and user has the right perms
(cherry picked from commit 284c2d6f71)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
This commit is contained in:
co-authored by
Ieva
parent
65c759c76a
commit
ae3419cd79
@@ -8,7 +8,7 @@ function checkFolderPermission(action: AccessControlAction, folderDTO?: FolderDT
|
||||
|
||||
function checkCanCreateFolders(folderDTO?: FolderDTO) {
|
||||
// Can only create a folder if we have permissions and either we're at root or nestedFolders is enabled
|
||||
if (folderDTO && !config.featureToggles.nestedFolders) {
|
||||
if (folderDTO && folderDTO.uid !== 'general' && !config.featureToggles.nestedFolders) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user