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

Remove Menu.php #6808

Merged
merged 4 commits into from
Feb 11, 2024
Merged

Remove Menu.php #6808

merged 4 commits into from
Feb 11, 2024

Conversation

DAcodedBEAT
Copy link
Contributor

Description & Issue number it closes

Back in version 4.2.3, there was an effort to remove the old Menu.php landing page and replace it with a new v2/dashboard. Since this was new and the previous developer wanted to ensure a clean migration, they added gutted the old Menu page and made it a redirect.

Now that an ample amount of time has passed since this change, it should be safe to remove the old Menu.php and exclusively rely on v2/dashboard.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

@DAcodedBEAT DAcodedBEAT added Code Smell php Pull requests that update Php code labels Jan 9, 2024
@DAcodedBEAT
Copy link
Contributor Author

@DawoudIO feel free to merge this whenever

@DAcodedBEAT DAcodedBEAT added this to the 5.5.0 milestone Jan 11, 2024
Copy link
Collaborator

@MrClever MrClever left a comment

Choose a reason for hiding this comment

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

Given the amount of time since 4.2.3 was dropped and the fact we have been using the v2/dashboard extensively elsewhere, this looks fine to me.

it might be worth creating a utility function that we can use to reduce the code duplication which is simply called by these pages:
'''
use some/util/thing; // maybe ‘AuthenticationManager’?

UserVerification(AuthenticationManager::getCurrentUser()->isRoleEnabled);
'''
The ‘UserVerification’ function takes the Boolean it is passed and simply decides on redirection to (dashboard currently) or not. That way, we can have a single point to manage what happens when someone hits a page they shouldn’t be on.

@DAcodedBEAT DAcodedBEAT removed this from the 5.5.0 milestone Jan 12, 2024
@DAcodedBEAT DAcodedBEAT merged commit 7073cc1 into master Feb 11, 2024
4 checks passed
@DAcodedBEAT DAcodedBEAT deleted the remove-menu-php branch February 11, 2024 04:55
@DAcodedBEAT DAcodedBEAT added this to the vNext milestone Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Smell Integration Testing php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants