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

handles role policy auto registration and resolves #407 #411

Merged
merged 2 commits into from
Sep 2, 2024

Conversation

bezhanSalleh
Copy link
Owner

No description provided.

@bezhanSalleh bezhanSalleh merged commit 2124283 into 3.x Sep 2, 2024
9 checks passed
Copy link

what-the-diff bot commented Sep 2, 2024

PR Summary

  • Enhanced structure for Base Path Locator
    A new class has been added to bootstrap/app.php to further organize the Base Path Locator. This will increase the accuracy of locating base paths in our project.

  • Incorporation of Finalize Script in Composer
    The composer.json file now includes a finalize script. This new script runs three commands: composer format to format the code, composer analyse to evaluate the code, and composer test to check for any potential issues.

  • Role Policy Registration Enabled
    In the config/filament-shield.php file, the register_role_policy option has been enabled to improve role-based access control. This gives us greater control over user access to specific services and resources.

  • Refactoring of Filament Shield Language Files
    The filament-shield.php language files in different languages have been reorganized in the resources/lang/ directory, improving the organization of our language files. Note that the Portuguese version of this file was removed.

  • Optimized Code Execution in CanGeneratePolicy and CanManipulateFiles
    The CanGeneratePolicy.php and CanManipulateFiles.php files under src/Commands/Concerns/ have been updated to be more efficient and prevent unnecessary operations. A new utility function has been used to get the policy path, and an unnecessary instantiation has been removed.

  • Updated FilamentShieldServiceProvider with Modified Closure
    The closure return statement in src/FilamentShieldServiceProvider.php has been modified to enhance performance.

  • Introduction of New Utility Methods
    src/Support/Utils.php has been expanded with two new methods: getPolicyPath() to fetch the policy path and isRolePolicyGenerated() to check if a role policy has been generated. Both these methods aim to simplify and streamline our handling of user role policies.

  • Removal of Empty Method Bodies in HasPageShield
    In src/Traits/HasPageShield.php, empty method bodies have been removed to decrease clutter and increase code readability.

@bezhanSalleh bezhanSalleh deleted the feature/handle-role-policy-auto-registration branch September 2, 2024 14:22
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