? ? ? Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
21 Mar 2021

Pull Request for Issue #30217.

Summary of Changes

This PR allows users to edit their account from administrator area of the site without requiring to have core.manager permission. If it is accepted, it will solve the release blocker issue #30217. Also, it allows us to removing the code which we have to add to com_admin to allow editing profile at the moment.

Testing instructions

  • Apply patch.
  • Create a user account, assign this account to Manager user group
  • Login to administrator account of the site using that manager account
  • Try to access to User Account section at the top right of administrator area, click on Edit Account and Accessibility Settings, make sure you can still access to the page and update the account data without any problem.
avatar joomdonation joomdonation - open - 21 Mar 2021
avatar joomdonation joomdonation - change - 21 Mar 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 21 Mar 2021
Category Administration com_users Modules
avatar brianteeman
brianteeman - comment - 21 Mar 2021

In principle yes this is how I see it being done

avatar joomdonation
joomdonation - comment - 21 Mar 2021

@brianteeman Could you please try it quickly to see what is missing or still need to be addressed?

avatar brianteeman
brianteeman - comment - 21 Mar 2021

From my quick test with both a manager and super administrator account this PR works correctly and is how it should have been done from the beginning without all the duplication of code in com_admin

avatar richard67
richard67 - comment - 21 Mar 2021

@joomdonation Event if it’s draft status you should fix the PHPCS (code style) errors reported by drone, because only if these pass the system tests will be run, and those would show if there was a mistake.

avatar joomdonation joomdonation - change - 21 Mar 2021
Labels Added: ?
e95aa11 21 Mar 2021 avatar joomdonation CS
avatar richard67
richard67 - comment - 21 Mar 2021

The main change here is it allows user to edit his own account ...

@joomdonation Should the title of the PR be changed from "[4.0] Allow Managers to edit account via com_users" to "[4.0] Allow Managers to edit own account via com_users"?

avatar joomdonation joomdonation - change - 21 Mar 2021
Title
[4.0] Allow Managers to edit account via com_users
[4.0] Allow users edit account via com_users without core.manager permission
avatar joomdonation joomdonation - edited - 21 Mar 2021
avatar joomdonation
joomdonation - comment - 21 Mar 2021

@richard67 Yes. I changed it to a better title (describe exactly what PR does)

avatar richard67
richard67 - comment - 21 Mar 2021

@joomdonation Your last commit changed the since tag at the wrong place. the old function should remain 1.6 and the new one should get deploy version, but you did it vice versa ;-)

avatar joomdonation joomdonation - change - 21 Mar 2021
The description was changed
avatar joomdonation joomdonation - edited - 21 Mar 2021
6dbb7aa 21 Mar 2021 avatar joomdonation CS
avatar joomdonation
joomdonation - comment - 21 Mar 2021

Thanks @richard67. Hope it is all OK now. On top of my head, this PR is now ready for reviewing and testing. Hopefully we can close the release blocker issue #30217

avatar richard67
richard67 - comment - 21 Mar 2021

@joomdonation

Hope it is all OK now.

Yes, code looks ok and clean to me.

Hopefully we can close the release blocker issue #30217

You mean this PR solves it? If you confirm, I will close it.

avatar richard67
richard67 - comment - 21 Mar 2021

Added the release blocker label as inherited from the issue.

avatar joomdonation
joomdonation - comment - 21 Mar 2021

@richard67 Yes, I think we can close that issue. Even if this PR is not accepted, I think most users can agree that it is not release blocker anymore (the problem right now is just duplication code which is solved if this PR is accepted)

avatar richard67
richard67 - comment - 21 Mar 2021

Even if this PR is not accepted, I think most users can agree that it is not release blocker anymore (the problem right now is just duplication code which is solved if this PR is accepted)

@joomdonation You mean I should remove the release blocker label from this PR?

avatar joomdonation
joomdonation - comment - 21 Mar 2021

@joomdonation You mean I should remove the release blocker label from this PR?

For now, we can leave it as how it is.

avatar wilsonge
wilsonge - comment - 21 Mar 2021

To me the thing I'd like to do before 4.0 ships is remove com_admin. Whilst we don't guarantee full b/c on extensions - I would rather just remove com_admin now before 4.0 ships and not have any issues.

avatar brianteeman
brianteeman - comment - 21 Mar 2021

Removing com_admin completely? It does a lot more than what this PR is correctly removing

avatar wilsonge
wilsonge - comment - 21 Mar 2021

Sorry to be clear the profile view that we added back in #29251 - I don't want to remove the rest of it

We can leave that removal for a separate PR - happy with that - this is fine as it is as it solves an "issue" in it's own right.

avatar brianteeman
brianteeman - comment - 22 Mar 2021

OK - we're all on the same page then

avatar joomdonation joomdonation - change - 23 Mar 2021
Labels Added: ?
avatar brianteeman
brianteeman - comment - 23 Mar 2021

Will you be removing the now useless code in com_admin in this PR

avatar rdeutz
rdeutz - comment - 23 Mar 2021

Will you be removing the now useless code in com_admin in this PR

Let's get that in, removal can be done in another PR.

avatar brianteeman
brianteeman - comment - 23 Mar 2021

I just asked so I knew if to mark this as good test or not

avatar brianteeman brianteeman - test_item - 23 Mar 2021 - Tested successfully
avatar brianteeman
brianteeman - comment - 23 Mar 2021

I have tested this item successfully on 9b3a9b8


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32771.

avatar rdeutz
rdeutz - comment - 24 Mar 2021

I tied to reproduce the error with current dev and it seems to be fixed magically. Can anyone confirm?

avatar joomdonation
joomdonation - comment - 24 Mar 2021

I tied to reproduce the error with current dev and it seems to be fixed magically. Can anyone confirm?

You mean you logged in using a manager account and can still edit the account? Maybe you still use the old link (which is linked to com_admin which should be removed if this PR is accepted)

avatar rdeutz
rdeutz - comment - 24 Mar 2021

I followed the instructions you gave and yes it is a link to com_admin. When I apply your patch then it still works but com_user is used.

Please change the testing instructions

avatar joomdonation
joomdonation - comment - 24 Mar 2021

Ah, Yes, sorry. The testing instructions need to be updated. I will do that.

avatar joomdonation joomdonation - change - 24 Mar 2021
The description was changed
avatar joomdonation joomdonation - edited - 24 Mar 2021
avatar rdeutz rdeutz - test_item - 24 Mar 2021 - Tested successfully
avatar rdeutz
rdeutz - comment - 24 Mar 2021

I have tested this item successfully on 9b3a9b8


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32771.

avatar richard67 richard67 - change - 24 Mar 2021
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 24 Mar 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32771.

avatar joomdonation joomdonation - change - 24 Mar 2021
Labels Added: ? ?
Removed: ?
avatar joomdonation
joomdonation - comment - 24 Mar 2021

Thanks Tobias. Committed the CS changes.

avatar richard67
richard67 - comment - 24 Mar 2021

Up to now it was code style only changed after the tests, but if the above suggestions (type safe comparison, cast to int) will committed, too, then it will need new human tests since these changes might change "behaviour" of the code.

2e92be8 24 Mar 2021 avatar joomdonation CS
avatar richard67 richard67 - change - 24 Mar 2021
Status Ready to Commit Pending
avatar richard67
richard67 - comment - 24 Mar 2021

Back to pending. Please test again. Thanks in advance.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32771.

avatar rdeutz rdeutz - test_item - 24 Mar 2021 - Tested successfully
avatar rdeutz
rdeutz - comment - 24 Mar 2021

I have tested this item successfully on 2e92be8


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32771.

avatar joomdonation joomdonation - change - 24 Mar 2021
Labels Added: ?
Removed: ? ?
avatar richard67 richard67 - alter_testresult - 24 Mar 2021 - rdeutz: Tested successfully
avatar richard67
richard67 - comment - 24 Mar 2021

Previous test by @rdeutz is still valid because the commit after that was just a small code style change. I've restored the result in the issue tracker so it's correctly counted there and here.

avatar jwaisner jwaisner - test_item - 24 Mar 2021 - Tested successfully
avatar jwaisner
jwaisner - comment - 24 Mar 2021

I have tested this item successfully on 688f66a


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32771.

avatar jwaisner jwaisner - change - 24 Mar 2021
Status Pending Ready to Commit
avatar jwaisner
jwaisner - comment - 24 Mar 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32771.

avatar SharkyKZ SharkyKZ - test_item - 24 Mar 2021 - Tested unsuccessfully
avatar SharkyKZ
SharkyKZ - comment - 24 Mar 2021

I have tested this item ? unsuccessfully on 688f66a

Doesn't work with PDO.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32771.

avatar richard67 richard67 - change - 24 Mar 2021
Status Ready to Commit Pending
avatar richard67
richard67 - comment - 24 Mar 2021

Back to pending


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32771.

avatar alikon
alikon - comment - 24 Mar 2021

setting back to pending


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32771.

avatar alikon
alikon - comment - 24 Mar 2021

got this on pdo with 8.0.23
Screenshot from 2021-03-24 19-01-11

avatar joomdonation joomdonation - change - 25 Mar 2021
Labels Added: ? ?
Removed: ?
avatar joomdonation
joomdonation - comment - 25 Mar 2021

So the problem is that PDO return string data type for User ID but MySQLi return int data type . I was not sure about it and that was the reason I used weak comparison at the begininging

I made modification as suggested. I tested it myself with both PDO and MySQLi, it is working well now. Please test it again. Thanks all for reviewing and testing and sorry for taking so much time from you for this PR.

avatar rdeutz rdeutz - test_item - 25 Mar 2021 - Tested successfully
avatar rdeutz
rdeutz - comment - 25 Mar 2021

I have tested this item successfully on f47df46


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32771.

avatar joomdonation
joomdonation - comment - 25 Mar 2021

@brianteeman Could you please re-test this PR?

avatar dgrammatiko dgrammatiko - test_item - 25 Mar 2021 - Tested successfully
avatar dgrammatiko
dgrammatiko - comment - 25 Mar 2021

I have tested this item successfully on f47df46


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32771.

avatar richard67 richard67 - change - 25 Mar 2021
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 25 Mar 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32771.

avatar wilsonge
wilsonge - comment - 26 Mar 2021

Thankyou so much guys. Much appreciated!

avatar wilsonge wilsonge - close - 26 Mar 2021
avatar wilsonge wilsonge - merge - 26 Mar 2021
avatar wilsonge wilsonge - change - 26 Mar 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-03-26 00:02:04
Closed_By wilsonge
Labels Added: ? ?
Removed: ? ?

Add a Comment

Login with GitHub to post a comment