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

[4.0] Namespace com_cpanel #15812

Merged
merged 3 commits into from
May 6, 2017
Merged

[4.0] Namespace com_cpanel #15812

merged 3 commits into from
May 6, 2017

Conversation

joomdonation
Copy link
Contributor

Pull Request for Issue # .

Summary of Changes

This simple PR convert cpanel component to namespace MVC in Joomla 4.

Testing Instructions

  1. Install Joomla 4.0-dev
  2. Apply patch
  3. Login to administrator area of the site, make sure cpanel is still loaded properly

Additional comments

At the moment, our component dispatcher always check permission for backend component. However, today, I see that some component (like com_cpanel, com_login) doesn't need permission checking, so I move the code which check permission to a separate method to make it easier to for component to override if needed (in this case, no permission check needed, so the method can just be blank). Not sure if it is a right way, I am open for suggestion (just want to bring it for discussion to find the right way)

/**
* No access permission check needed
*/
protected function checkAccess()
Copy link
Member

Choose a reason for hiding this comment

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

Does this function need to be here if it's empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. It is needed. Most components in backend need access permission check like this https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/CMS/Dispatcher/Dispatcher.php#L100-L104

However, com_cpanel (and com_login) don't need this check, that's why this method is empty and needed. I mean no access permission check needed for this component.

@mbabker mbabker added this to Testing/Review in [4.0] Namespacing May 4, 2017
@joomdonation joomdonation changed the title [4.0] Namespace com cpanel [4.0] Namespace com_cpanel May 6, 2017
@wilsonge wilsonge merged commit a700fa4 into joomla:4.0-dev May 6, 2017
@wilsonge wilsonge added this to the Joomla 4.0 milestone May 6, 2017
@wilsonge
Copy link
Contributor

wilsonge commented May 6, 2017

Thanks!

@mbabker mbabker moved this from Testing/Review to Completed in [4.0] Namespacing May 6, 2017
@joomdonation joomdonation deleted the namespace_com_cpanel branch May 7, 2017 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants