Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug fix] implement the resource and page security #118

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aisuvro
Copy link

@aisuvro aisuvro commented Jan 15, 2025

Hi,
If the Module is disabled, the user can see the Resource and Page in the navigation.
In this commit I made a trait for Resource and Page to protect the access.
Thanks

Copy link

what-the-diff bot commented Jan 15, 2025

PR Summary 🚀

Alright team! Here's a quick breakdown of the impressive enhancements made for this grand update. 💪

  • Lending a Helping Hand in README.md 📕
    Our README.md has been retouched to include crucial guidance on securing resources and pages when the module takes a little nap. It's your pathfinder to sailing through the application smoothly, even when some features are switched off. 🙌

  • Meet the New 'Page' Class 💻
    Behind the scenes, we've been hard at work! All for you! Meet our new abstract class Page under src/Page.php! This newcomer extends the mighty Filament\Pages\Page class and borrows from CanAccessTrait, another innovation we've concocted - more on that in a bit! 👩‍💻

  • Say Hello to New Class 'Resource' 👋
    We're not stopping there! Another new kid on the block is the abstract class Resource tucked under src/Resource.php. The class extends Filament\Resources\Resource and integrates our brilliant new CanAccessTrait. These changes are all part of our mission to keep enhancing your user experience. 🏆

  • Behold the 'CanAccessTrait' Trait 💂
    Say hello to the new sheriff in town, folks! CanAccessTrait living under src/Traits/CanAccessTrait.php. It comes with super-helpful methods that allow us to quickly check module access. Now, we'll be better able to manage access to various parts of our application, maintaining optimal security at all times! 👮

Keep up the hard work team, you are all doing great! 🌟 You are turning ideas into reality and pushing boundaries. Onward and upward! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant