-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[CHORE] Add permissions to Redux #2914
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
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
e2760e3
[FIX] Add permissions to Redux store
kresnaputra 514193c
add only permissions being used in the app
kresnaputra ce83ed8
add clear permissions reducer
kresnaputra ebfcbbb
call RocketChat.hasPermission from reducer
kresnaputra 7371f00
add server version comparison on getPermissions
kresnaputra d2464ae
Merge branch 'develop' into fix.add-permissions-to-redux-store
kresnaputra 35e90a6
Merge branch 'develop' into fix.add-permissions-to-redux-store
diegolmello c4f78a4
refactor hasPermission function
kresnaputra e714d44
refactor hasPermission function
kresnaputra 35c19bf
remove uncomment code
kresnaputra 61bd15a
use Q.experimentalSortBy()
kresnaputra a3af55a
Merge branch 'fix.add-permissions-to-redux-store' of github.com:Rocke…
kresnaputra 87dde11
add coerce function
kresnaputra 4fe0ab1
Merge branch 'develop' into fix.add-permissions-to-redux-store
diegolmello 80ebeba
Change Rocketchat.hasPermission
diegolmello f27d4a6
Apply on isReadOnly
diegolmello 8060b58
Apply to RoomInfoEditView
diegolmello 6329bdf
Apply to RoomInfoView and RoomInfoEditView
diegolmello 966264f
canAutoTranslate
diegolmello 1f3adeb
Unnecessary clear permissions
diegolmello 9a5be0d
Revert getUpdatedSince
diegolmello d0ecfc7
Naming fix
diegolmello 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import * as types from './actionsTypes'; | ||
|
|
||
| export function setPermissions(permissions) { | ||
| return { | ||
| type: types.PERMISSIONS.SET, | ||
| permissions | ||
| }; | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import { PERMISSIONS } from '../actions/actionsTypes'; | ||
|
|
||
| const initialState = { | ||
| permissions: {} | ||
| }; | ||
|
|
||
| export default function permissions(state = initialState, action) { | ||
| switch (action.type) { | ||
| case PERMISSIONS.SET: | ||
| return action.permissions; | ||
| default: | ||
| return state; | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.