-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add owner grouping logic to add/remove owners #1059
base: main
Are you sure you want to change the base?
Conversation
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.
* Give ownership of grouping at grouping path to newOwner. A user with owner privileges has
* read and write privileges
* of a grouping.
The above should be on two lines.
In the comments the spelling "owners-group" might be clearer.
7d9e969
to
41ebd69
Compare
if(owner.name.includes(':')) { | ||
owner.isOwnerGrouping = true; | ||
// Name field in owner groupings initially holds the group path | ||
owner.ownerGroupingPath = owner.name; | ||
const splitOwnerPath = owner.name.split(':'); | ||
// Isolate the grouping name from the path | ||
owner.name = splitOwnerPath[splitOwnerPath.length - 1]; | ||
} |
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.
This logic should be on the API side, but that can be for another ticket.
if (listName === "owners") { | ||
// If the user input has a colon, we can assume that it's a group path | ||
if ($scope.manageMembers.includes(':')) { | ||
listName = "owner grouping"; |
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.
There technically is no listName/groupName just for owner groupings, it would still be the owner group. Could you use a $scope.isOwnerGrouping variable instead?
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.
@JorWo One slight issue I see with this is that the owner objects have the owner.isOwnerGrouping field and that may be confusing to some. However, if this isn't an issue I can push up the changes! (Maybe I can name it just ownerGrouping?)
Edit: Actually, it seems that a lot of the checks that use listName treats it as a string, so changing it to use a boolean in $scope.isOwnerGrouping to check would require certain functions to do a separate check just for isOwnerGrouping as well as the listName check. I can provide examples as well if needed
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.
There are many places that in the code that use a $scope and non-scope variable to describe the same thing like $scope.listName and listName, so I assume both owner.isOwnerGrouping and $scope.isOwnerGrouping being used would not be too confusing.
Having checks for listName == "owners" && isOwnerGrouping
is fine because it is still readable.
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.
@JorWo Got it! I'll make the changes
Are the cases handled when adding:
|
<!-- | ||
<p class="alert alert-warning mt-2" role="alert" ng-if="hasDeptAccount"> | ||
<span class="text-dark" th:text="#{screen.message.modal.add.deptAccount}"></span> | ||
</p> | ||
|
||
do I need to account for departmental accounts that are in the grouping? | ||
--> |
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.
I noticed you left this comment here.
Make sure to fix the Codacy issues, thanks. |
I believe I had a talk with Michael about how we don't need to account for situations where users are adding more than one grouping path. @mhodgesatuh could I get your opinion on this? Regarding the second question, it does not currently handle the mix of uhIdentifiers and owner grouping paths |
41ebd69
to
fcf8c00
Compare
Regarding the more than one grouping path question, here's some context: |
@mhodgesatuh Any thoughts on displaying a "feature not supported" modal if those select CSOC individuals did attempt to add more than one groupingPath owner or a mix of uhIdentifiers and groupingPaths? I want to make sure there are no disastrous consequences of not handling those cases. |
@JorWo Please update the ticket to describe at least include a minimal set of input controls to ensure that there is no unanticipated behavior. I'm fine, for example, if the initial implementation only allows for a single owner-grouping reference, in order to get minimal functionality established. |
Ok, I added a user input edge cases section to the bottom of the ticket. |
f63ddbd
to
e244325
Compare
add new modals for adding and removing group path owners Create new controller functions Implement new grouping owner add/remove logic Fixed add bug Implement hyperlink for grouping owners Add more comments and fix CSS spacing Create and update existing jasmine tests Finalize clean up Fix remove bug Fix pull request changes Fix more pull request changes Codacy issues Codacy
e244325
to
a0fd5f0
Compare
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.
I suggest we consistent hyphenate owner-grouper to represent the use of a grouping to indicate the indirect owners, AKA co-owners.
Ticket Link
1682
List of squashed commits
Test Checklist