Skip to content

Add remove user to groups not case sensitive#35342

Merged
phil-davis merged 9 commits into
masterfrom
add-remove-user-to-groups-not-case-sensitive
May 29, 2019
Merged

Add remove user to groups not case sensitive#35342
phil-davis merged 9 commits into
masterfrom
add-remove-user-to-groups-not-case-sensitive

Conversation

@phil-davis

@phil-davis phil-davis commented May 28, 2019

Copy link
Copy Markdown
Contributor

Description

Add API and CLI acceptance tests to:

  • add and delete users using different case of the username (UID)
  • add and delete groups using different case of the group name, checking that distinct groups are being managed
  • add and delete users in groups, using different case of user and group name, making sure that distinct groups are managed correctly, and the user names behave in the "opposite" way (they are not case-sensitive)
  • when remembering the users that have been created during a test scenario, always remember the lowercase name, and index into the remembered array with the lowercase version - so that the acceptance test code happily understands that when user0 has been created then USER0 is deleted, that those were the same user.

Related Issue

Part of issue #35354

Motivation and Context

User names (IDs) are not case-sensitive, so user0, User0 and USER0 are all the same user.
Group names are case-sensitive, so group1, Group1 and GROUP1 are 3 different groups that can have different members.

We should "document" this behaviour in acceptance tests so that we know if it accidentally changes.

How Has This Been Tested?

Local runs of the acceptance test scenarios plus CI

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

@individual-it

Copy link
Copy Markdown
Member

@haribhandari07 please have a look if that makes sense to you

@codecov

codecov Bot commented May 28, 2019

Copy link
Copy Markdown

Codecov Report

Merging #35342 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #35342   +/-   ##
=========================================
  Coverage     65.53%   65.53%           
  Complexity    18648    18648           
=========================================
  Files          1218     1218           
  Lines         70548    70548           
  Branches       1288     1288           
=========================================
  Hits          46235    46235           
  Misses        23936    23936           
  Partials        377      377
Flag Coverage Δ Complexity Δ
#javascript 53.69% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.89% <ø> (ø) 18648 <ø> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7684118...cda12e9. Read the comment docs.

1 similar comment
@codecov

codecov Bot commented May 28, 2019

Copy link
Copy Markdown

Codecov Report

Merging #35342 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #35342   +/-   ##
=========================================
  Coverage     65.53%   65.53%           
  Complexity    18648    18648           
=========================================
  Files          1218     1218           
  Lines         70548    70548           
  Branches       1288     1288           
=========================================
  Hits          46235    46235           
  Misses        23936    23936           
  Partials        377      377
Flag Coverage Δ Complexity Δ
#javascript 53.69% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.89% <ø> (ø) 18648 <ø> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7684118...cda12e9. Read the comment docs.

@haribhandari07

Copy link
Copy Markdown
Contributor

looks good to me

@paurakhsharma paurakhsharma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me 👍

@phil-davis
phil-davis merged commit f4a1858 into master May 29, 2019
@delete-merged-branch
delete-merged-branch Bot deleted the add-remove-user-to-groups-not-case-sensitive branch May 29, 2019 06:37
@phil-davis

Copy link
Copy Markdown
Contributor Author

Backport stable10 #35343

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants