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

Batch process on users #38596

Conversation

brianteeman
Copy link
Contributor

Pull request for #32732

The batch process on users lets you remove a user from a group. But it doesn't check to make sure that the user is still in at least one group.

To test

Test 1

  1. Create a new user and put them in the registered usergroup
  2. Using the batch process try to remove them from the registered usergroup

Before

Success message and user not in any group

After

Batch process failed with following error: A user must belong to at least one group.

Test 2

  1. Create a new user and put them in the registered AND author usergroup
  2. Using the batch process try to remove them from the editor usergroup

Before

Success message and user still in the registered and author usergroups

After

Batch process failed with following error: The selected user(s) are not in the selected group.

Test 3

  1. Create a new user and put them in the registered AND author usergroup
  2. Using the batch process try to remove them from the registered usergroup

Before

Success message and user only in the author usergroup

After

Success message and user only in the author usergroup

Comments

This type of code is really not my strong point - it may need optimizing etc

The batch process on users lets you remove a user from a group. But it doesn't check to make sure that the user is still in at least one group.

## To test
### Test 1
1. Create a new user and put them in the registered usergroup
2. Using the batch process try to remove them from the registered usergroup
#### Before
Success message and user now not in any group
#### After
Batch process failed with following error: A user must belong to at least one group.

### Test 2
1. Create a new user and put them in the registered AND author usergroup
2. Using the batch process try to remove them from the editor usergroup
#### Before
Success message and user still in the registered and author usergroups
#### After
Batch process failed with following error: The selected user(s) are not in the selected group.

### Test 3
1. Create a new user and put them in the registered AND author usergroup
2. Using the batch process try to remove them from the registered usergroup
#### Before
Success message and user only in the author usergroup
#### After
Success message and user only in the author usergroup

#### Comments
This type of code is really not my strong point - it may need optimizing etc
@ghost
Copy link

ghost commented Aug 26, 2022

I have tested this item ✅ successfully on 2081df5


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

1 similar comment
@viocassel
Copy link
Contributor

I have tested this item ✅ successfully on 2081df5


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

@richard67
Copy link
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Aug 28, 2022
@chmst
Copy link
Contributor

chmst commented Sep 9, 2022

I remember a rule that comments have to start with a capital lettter?

@brianteeman
Copy link
Contributor Author

@chmst yes you're right my bad. also the multiline comment should not use //

suprised the code style check didnt pick this up.

I will update shortly

@fancyFranci fancyFranci merged commit 0a38a06 into joomla:4.2-dev Sep 15, 2022
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Sep 15, 2022
@fancyFranci
Copy link
Contributor

Thank you! Great branch name :D

@fancyFranci fancyFranci added this to the Joomla! 4.2.3 milestone Sep 15, 2022
@brianteeman
Copy link
Contributor Author

Wow this gets merged but removing unused CSS doesn't. Makes no sense

@brianteeman brianteeman deleted the oh_my_this_took_far_too_long_and_is_possibly_wrong branch September 15, 2022 21:05
Kostelano added a commit to JPathRu/localisation that referenced this pull request Sep 23, 2022
joomla/joomla-cms#38670 - (только для en-GB)
joomla/joomla-cms#38463 +
joomla/joomla-cms#38703 - (только для en-GB)
joomla/joomla-cms#38208 +
joomla/joomla-cms#38704 - (только для en-GB)
joomla/joomla-cms#38732 - (только для en-GB)
joomla/joomla-cms#38772 - (только для en-GB)
joomla/joomla-cms#38596 +
@heelc29 heelc29 mentioned this pull request Dec 23, 2022
2 tasks
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.

8 participants