[v11.2.x] Folders: Correctly show new folder button under root folder (#94712)
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
7db056f19b
commit
da025b1bd3
@@ -11,7 +11,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