-
Notifications
You must be signed in to change notification settings - Fork 409
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
[Backport 2024.01.xx]: #10414: Remove the list of associated groups of logged in user from the User Details modal window (#10415) #10447
Merged
tdipisa
merged 4 commits into
geosolutions-it:2024.01.xx
from
mahmoudadel54:porting_10414_2024.01.xx
Jun 28, 2024
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
35b6f07
#10418: Share tool - the 'Add place mark and zoom to sharing link' op…
mahmoudadel54 8489946
Merge branch '2024.01.xx' of https://github.com/geosolutions-it/MapSt…
mahmoudadel54 4e8c10e
backport #10414 with fix conflict in migration file
mahmoudadel54 167597d
fix migration conflict during merge
mahmoudadel54 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,4 +75,49 @@ describe("Test user details modal", () => { | |
|
||
expect(modalDOM.getElementsByClassName('row').length).toEqual(6); | ||
}); | ||
it('test hide group user info if hideGroupUserInfo = true', () => { | ||
let testUser = { | ||
"attribute": [ | ||
{ | ||
"name": "company", | ||
"value": "Some Company" | ||
}, | ||
{ | ||
"name": "email", | ||
"value": "[email protected]" | ||
}, | ||
{ | ||
"name": "notes", | ||
"value": "some notes" | ||
}, | ||
{ | ||
"name": "UUID", | ||
"value": "260a670e-4dc0-4719-8bc9-85555d7dcbe1" | ||
} | ||
], | ||
"enabled": true, | ||
"groups": { | ||
"group": { | ||
"enabled": true, | ||
"groupName": "everyone", | ||
"id": 3 | ||
} | ||
}, | ||
"id": 6, | ||
"name": "admin", | ||
"role": "ADMIN" | ||
}; | ||
let displayAttributes = (attr) => { | ||
return attr.name && attr.name === "email" || attr.name === "company"; | ||
}; | ||
const cmpNormal = ReactDOM.render(<UDModal options={{animation: false}} show displayAttributes={displayAttributes} user={testUser}/>, document.getElementById("container")); | ||
expect(cmpNormal).toExist(); | ||
const modalDOMNormal = document.getElementsByClassName('ms-resizable-modal')[0]; | ||
expect(modalDOMNormal.querySelector('.user-group-info')).toExist(); // includes group info | ||
|
||
const cmpWithHide = ReactDOM.render(<UDModal hideGroupUserInfo options={{animation: false}} show displayAttributes={displayAttributes} user={testUser}/>, document.getElementById("container")); | ||
expect(cmpWithHide).toExist(); | ||
const modalDOM = document.getElementsByClassName('ms-resizable-modal')[0]; | ||
expect(modalDOM.querySelector('.user-group-info')).toNotExist(); // not include group info | ||
}); | ||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mahmoudadel54 please fix conflicts and double check your PR after you create it comparing it with the previous one in case of backports to ensure you are contributing the same contents.