Skip to content

Conversation

@Alliionart
Copy link

Integrates alexusmai's file explorer into LK for staff to easily pick through the desired disks/folders. The file manager is accessible through:

  • sitename.com/filemanager
  • File manager on admin settings
  • Tinymce Image Source Button

This updates Tinymce to v5.4.2 - so far I have not seen any conflicts with anything core in 3.0.0. But maybe need to watch out for any other extensions with ties to older versions. This should be compatible with future tinymce versions.

All methods require the user be staff AND have the "manage_files" power. The default accessible folder is the /files folder and nothing else. Though two public examples exist in the commented code in the config.

Security tested on all 3 with both staff without the power, staff with the power, normal members and guests.
fm-gallery-view
file-manager-main

Alliionart and others added 19 commits June 19, 2025 21:00
+ Updated: TinyMCE to v5.4.2
- Fix: Callback now functions properly when opening the source and double clicking an image. This will automatically add the URL to the source box and close the file manager.
- Updated: Now only staff should have access to the file manager in case there is secret content.
- Adds a button to the File Manager on the base LK file manager page under settings.
- Updated: Logged in users will no longer get an error accessing a page with a WYSIWYG
+ Added: New power 'manage_files' that can be added to roles. DO NOT ADD TO NORMAL USERS (Unless you configure the explorer with items you are ok with them seeing). PLEASE.
Now the File Manager will show if the user has the power to manage_files
Ensures double no-access to the file manager
- Removed: Public folder access
@itinerare itinerare added enhancement New feature or request needs review Pull requests that are pending community review labels Sep 5, 2025
"spatie/laravel-feed": "^4.1",
"spatie/laravel-honeypot": "^4.1"
"spatie/laravel-honeypot": "^4.1",
"tinymce/tinymce": "5.4.2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to handle this via npm and include it in what mix handles... Probably out of scope for this PR, though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All told, it might be easier to update tinyMCE that way in a separate PR, and then apply these changes on top... as it is, this is a tough PR to review because the signal/noise ratio is a bit dire due to the update changes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be worth it to even update tinymce to a higher version like v7 for the enhanced code editor to merge that into core? Adding the reference here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had issues with tinyMCE versions past... 6.7.3, it looks like? where the toolbar likes to vanish. though it may be a quirk of vite or something. But, assuming that doesn't kick in, potentially?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@itinerare Did it load without the toolbar and take way too long to have the toolbar appear? I had that issue and seemed to resolve it by removing addons/plugins I didn't necessarily use (spoiler, emojis, etc) and now it loads much faster. Potentially a similar cause?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The toolbar just never loaded-- but this is, again, only on versions after the stated one, so not something that should impact LK unless you've gone out of your way to update it.

Alliionart and others added 2 commits September 5, 2025 16:01
- Fix .gitignore issues
- Add file manager for home controller for routing
- remove unneeded middleware
@SpeedyD
Copy link
Contributor

SpeedyD commented Sep 24, 2025

I'm having trouble understanding why this seems entirely necessary.. is there a way to disable this function entirely?

@itinerare
Copy link
Member

Yeah, part of the notion is that it be behind a config toggle.

@SpeedyD
Copy link
Contributor

SpeedyD commented Sep 24, 2025

Ah, I assume that'll be coming soon, then? Cause so far the only thing I've seen restricting it is rank powers.

@itinerare itinerare marked this pull request as draft September 24, 2025 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request needs review Pull requests that are pending community review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants