Skip to content

[4.0] Improve backend edit account#32947

Merged
wilsonge merged 2 commits intojoomla:4.0-devfrom
joomdonation:patch-2
Apr 1, 2021
Merged

[4.0] Improve backend edit account#32947
wilsonge merged 2 commits intojoomla:4.0-devfrom
joomdonation:patch-2

Conversation

@joomdonation
Copy link
Contributor

Pull Request for Issue # .

Summary of Changes

PR #32771 allows users without core.manage permission to edit their own accounts directly via com_users instead of via view profile of com_admin (view profile later was removed via PR #32933)

However, it causes some changes when a manager edit his account:

  • He can now change username even if Change Username parameter in com_users set to No
  • He can see and changes some settings which he should not be allowed to change like Receiving System Emails, User Status...

This PR fixes that behavior. Basically, for users without core.manager permission, editing his account (now via com_users) should work the same as before (via com_admin)

Testing Instructions

  1. Apply Patch
  2. Login to administrator area of your site using a manager user account
  3. Access to Edit Account link from User Menu at the top right
  4. Before patch:
  • You can change username (when Change Username parameter in com_users set to No - default Joomla 4 setting)
  • You can see some fields: Last Reset Date, Password Reset Count, Receive System Emails, User Status
  1. After patch:
  • You are not allowed to change username when Change Username parameter in com_users set to No
  • You won't see the fields Last Reset Date, Password Reset Count, Receive System Emails, User Status anymore

@joomdonation
Copy link
Contributor Author

Ping @ceford since you reported the issue at #32933 (comment)

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-4.0-dev labels Mar 31, 2021
@ceford
Copy link
Contributor

ceford commented Mar 31, 2021

For some reason this PR has no Test or diff buttons when accessed from Patchtester. And I don't know how return test result another way.

I am happy and it is a pass. But I am not sure an Administrator should be allowed to set his own Status to blocked.


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

@joomdonation
Copy link
Contributor Author

For some reason this PR has no Test or diff buttons when accessed from Patchtester. And I don't know how return test result another way

Maybe you will have to click on Fetch Data to have Patch Tester fetches the new PRs. I still see the PRs listed (see the attached screenshot)
PRs

There is another way to test if you cannot use patch tester. Just download the update package for this PR https://ci.joomla.org/artifacts/joomla/joomla-cms/4.0-dev/32947/downloads/41449/Joomla_4.0.0-beta8-dev+pr.32947-Development-Update_Package.zip , go to System -> Update -> Joomla (the URL of that page looks like http://localhost/joomla4/administrator/index.php?option=com_joomlaupdate ), upload and install this update package. Then you can test it.

I am happy and it is a pass. But I am not sure an Administrator should be allowed to set his own Status to blocked.

I have same question for this myself. I'm unsure if a user should be able to change his Status to Blocked. However, that's the current behavior of Joomla! and I don't want to touch it. For this PR, I just want to address the issue which you reported (make sense BTW).

@ceford
Copy link
Contributor

ceford commented Apr 1, 2021

On submitting test result - in Patchtester I have done Reset and Fetch Data (twice). For this PR in the Joomla Issue Tracker I see this:

screen shot 2021-04-01 at 06 02 34

In comparison to other PRs such as this:

screen shot 2021-04-01 at 06 03 16

In the first example (this PR) the Diff link and Test this button are missing so I can't submit a test result. I have applied the patch and tested it but I don't know another way to return a result.


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

@joomdonation
Copy link
Contributor Author

@ceford Ah, Yes. I see. I could not see submit test result button in issue tracker, too, so strange. So have you tested this PR yet? If it is a success, maybe you can leave a comment here so that maintainer knows about it.

@infograf768
Copy link
Member

infograf768 commented Apr 1, 2021

👍 Works fine. (Submit test is not available in https://issues.joomla.org/tracker/joomla-cms/32947 )


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

@ceford
Copy link
Contributor

ceford commented Apr 1, 2021

👍 Works fine. Count this as a test Pass.

@joomdonation
Copy link
Contributor Author

Thanks @ceford and @infograf768 for testing.

@infograf768
Copy link
Member

RTC


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

@infograf768 infograf768 removed Language Change This is for Translators PR-4.0-dev labels Apr 1, 2021
@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Apr 1, 2021
@infograf768 infograf768 added this to the Joomla 4.0 milestone Apr 1, 2021
@richard67 richard67 added Language Change This is for Translators PR-4.0-dev labels Apr 1, 2021
@wilsonge wilsonge merged commit 5c1c429 into joomla:4.0-dev Apr 1, 2021
@wilsonge
Copy link
Contributor

wilsonge commented Apr 1, 2021

Thanks!

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Apr 1, 2021
@joomdonation joomdonation deleted the patch-2 branch April 1, 2021 13:35
dgrammatiko pushed a commit to dgrammatiko/joomla-cms that referenced this pull request Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language Change This is for Translators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

Comments