This repository has been archived by the owner on May 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Add a "Remove all space roles" button #1164
Merged
+137
−1
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
60a1f3a
Add the user action constants for removing all roles at a space level
rememberlenny f17dfb1
Create the response to a user role change, so the UI updates
rememberlenny 2dfc222
Create new user actions so that the user role changes can be replied to
rememberlenny 459529e
Add space based action items
rememberlenny 011a03b
Create working tests
rememberlenny dce8cf7
Save the changes around the constants
rememberlenny 1c9a47d
Add a test to check for user manipulation
rememberlenny ff7fe55
Create the space check and remove handling
rememberlenny 2c2b8d4
Move the comment to correct action
rememberlenny 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
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 |
---|---|---|
|
@@ -270,6 +270,10 @@ const userActionTypes = keymirror({ | |
USER_INVITE_ERROR: null, | ||
// Action to dismiss an user list notification. | ||
USER_LIST_NOTICE_DISMISSED: null, | ||
// Action when all roles for space user are removed. | ||
USER_REMOVE_ALL_SPACE_ROLES: null, | ||
// Action to removed all roles for space user. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
USER_REMOVED_ALL_SPACE_ROLES: null, | ||
// Action to delete a user from an org. | ||
USER_DELETE: null, | ||
// Action when a user was deleted from an org on the server. | ||
|
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 |
---|---|---|
|
@@ -172,6 +172,13 @@ export class UserStore extends BaseStore { | |
break; | ||
} | ||
|
||
case userActionTypes.USER_REMOVED_ALL_SPACE_ROLES: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. only need one more test. that it changes the list of users upon removing the person. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there's similar tests for the store for the add or delete cases. |
||
this.delete(action.userGuid, (changed) => { | ||
if (changed) this.emitChange(); | ||
}); | ||
break; | ||
} | ||
|
||
case userActionTypes.ERROR_REMOVE_USER: { | ||
this._error = action.error; | ||
this.emitChange(); | ||
|
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
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.
oops i think i told you to put that comment on the wrong constant. i meant the one below should be the
Action when all
...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 first one should be
Action to...
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.
Fixed!