? ? Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
25 Jan 2020

Pull Request for Issue #27262 .

Summary of Changes

added a check via joomla user plugin onUserBeforeSave event

Testing Instructions

  • Enable user registration.
  • Set New User Registration Group to Super Users.
  • Set Guest User Group to Super Users.

Screenshot from 2020-01-25 10-24-26

Expected result

No one should be able to register as Super User on registration (frontend).

Actual result

under these settings a new user can register as Super Users

c844021 25 Jan 2020 avatar alikon cs
avatar alikon alikon - open - 25 Jan 2020
avatar alikon alikon - change - 25 Jan 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 Jan 2020
Category Front End Plugins
avatar viocassel viocassel - test_item - 25 Jan 2020 - Tested successfully
avatar viocassel
viocassel - comment - 25 Jan 2020

I have tested this item โœ… successfully on c844021


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

avatar jwaisner
jwaisner - comment - 25 Jan 2020

Testing looks good. The error presented may need converted to a more friendly response.

@alikon Is this the expected presentation of the error?

27629

avatar jwaisner jwaisner - test_item - 25 Jan 2020 - Tested successfully
avatar jwaisner
jwaisner - comment - 25 Jan 2020

I have tested this item โœ… successfully on c844021

Tests good for the intention of this PR. if the concerns about the error message display need corrected a separate PR can be done for that.


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

avatar Quy Quy - change - 26 Jan 2020
Status Pending Ready to Commit
avatar Quy
Quy - comment - 26 Jan 2020

RTC


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

avatar infograf768 infograf768 - change - 26 Jan 2020
Status Ready to Commit Pending
avatar infograf768
infograf768 - comment - 26 Jan 2020

Setting back to pending as the new lang string is neither present in the plugin strings, neither in the installation lang strings.

Note

After correcting these and if merged, TTs have to be informed (via Mig) that the installation lang files will have to be updated.


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

avatar joomla-cms-bot joomla-cms-bot - change - 27 Jan 2020
Category Front End Plugins Administration Language & Strings Front End Plugins
avatar alikon
alikon - comment - 27 Jan 2020

Can someone suggest/correct the text for the language string please

avatar alikon alikon - change - 12 Feb 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-02-12 19:27:58
Closed_By alikon
Labels Added: ? ? ?
avatar alikon alikon - close - 12 Feb 2020
avatar alikon alikon - change - 19 Feb 2020
Status Closed New
Closed_Date 2020-02-12 19:27:58
Closed_By alikon
Labels Added: ?
Removed: ?
avatar alikon alikon - change - 19 Feb 2020
Status New Pending
avatar alikon alikon - reopen - 19 Feb 2020
avatar alikon alikon - change - 19 Feb 2020
Labels Added: ?
Removed: ?
avatar brianteeman
brianteeman - comment - 19 Feb 2020

I am not convinced this is the correct approach. What you are doing here is to prevent the user being created by one plugin. This wouldn't prevent a user being created if a different plugin was being used. Surely the correct approach is to prevent the situation being created in the first place by preventing a site admin from even being able to configure their site in this way. If there is no way that a guest user can be a super user and no way that a guest user can be a new registered user then the ability to create that scenario should be prevented in the component. Blocking it here is shutting the gate after the horse has bolted.

avatar brianteeman
brianteeman - comment - 19 Feb 2020

To explain a bit more, the plugin is importing the options from the component. Any plugin or extension can do that as well and they do. So you need to fix the problemat the source which is the component not the plugin

avatar hdouglassmith
hdouglassmith - comment - 19 Feb 2020

I think there is an arguement for needing to do this in BOTH the plugin AND the component. As Brian says, it is the component which creates the user, or gives this option. However, there are other extensions/components which also create users, so the more robust approach would be to additionally make this change in the plugin to prevent a SuperUser being created from the front end.

avatar brianteeman
brianteeman - comment - 19 Feb 2020

The plugin imports its settings from com_users - therefore if a non core extension is using the plugin it is de facto using the options in the component.

If a non core extension imports the settings itself it is also using the options in the component

If the non core extension is creating users any other ie directly into the database then there is nothing we can do about that.

Therefore there is no need to put any code in the plugin to handle this. It wont make anything more robust - it must all be in the component.

avatar alikon
alikon - comment - 19 Feb 2020

if you disable the joomla user plugin you even are not able to login more

avatar brianteeman
brianteeman - comment - 19 Feb 2020

Not true. You are confusing this USER plugin with the AUTHENTICATION plugins

image

avatar alikon
alikon - comment - 19 Feb 2020

maybe
but just give me 0,01ยข of your time and check it

avatar brianteeman
brianteeman - comment - 19 Feb 2020

that is because it is handling sessions and nothing to do with authentication. It is still irrelevant to this pr. the plugin is the wrong place to achieve your aims

avatar alikon
alikon - comment - 19 Feb 2020

i don't claim that this is the better way, that's why the issue is still open #27262 (comment)

avatar jwaisner
jwaisner - comment - 20 Feb 2020

Test looks good. I am unable to register as a superuser. I do get the response below, and I am not sure if it need to be translated to a friendly version or if it is okay as is.

27629

avatar jwaisner
jwaisner - comment - 20 Feb 2020

I have tested this item โœ… successfully on b2353b3


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

avatar jwaisner jwaisner - test_item - 20 Feb 2020 - Tested successfully
avatar brianteeman
brianteeman - comment - 22 Feb 2020

Please see #28011 for what I believe is the correct approach - preventing the super user being selectable in the first place

avatar alikon
alikon - comment - 24 Feb 2020

closed in favour of #28011

avatar alikon alikon - change - 24 Feb 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-02-24 19:46:22
Closed_By alikon
Labels Removed: ?
avatar alikon alikon - close - 24 Feb 2020

Add a Comment

Login with GitHub to post a comment