Skip to content

Restricting users from navigating to higher folders #165

@benjaminhull

Description

@benjaminhull

Hi there. Thanks for a great Nova package!

I have found that if I set the initial folder to a folder which is one or two levels deep, the user is then unable to navigate back up to higher folders. This is very often helpful! E.g.

FilemanagerField::make('Audio', 'audio')
    ->folder('folder 1/folder 2/')

However, if I go three deep on folder structure, the rule no longer applies and the user can navigate back up the second level.

FilemanagerField::make('Audio', 'audio')
    ->folder('folder 1/folder 2/folder 3') // This will allow the user to still get back to 'folder 2'

Is this by design? And if so, can some configuration be enabled around this behaviour? I think it would really helpful to have:

  • The ability to set at what depth this behaviour kicks in
  • The ability to override this on a given FilemanagerField::make instance with something like:
FilemanagerField::make('Audio', 'audio')
    ->folder('folder 1/folder 2/folder 3/folder 4')
    ->disallowNavigatingUp() // Stops users from navigating up regardless of level used

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions