You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on pair programming 14/09/2016 with @sebas5384:
constdisplayLoggedInMessageRule={type: DISPLAY_ADMIN_LOGGED_IN_MESSAGE,// All conditions for all rules are called, need some kind of memoization.condition: (state,action)=>{const{ every, some }=feedOperators(state,action)returnevery([// Action is a condition({state, action})=>action.type===LOGIN_SUCCESS,some([({state, action})=>state.user.roles.indexOf('admin')!==-1,({state, action})=>state.user.roles.indexOf('superadmin')!==-1])])},middleware: store=>next=>action=>{next({type: DISPLAY_MESSAGE,payload: 'You are logged in!'})returnnext(action)}}
constdisplayLoggedInMessageRule={type: DISPLAY_ADMIN_LOGGED_IN_MESSAGE,// A list of action types to match before any conditions are computed.actions: [LOGIN_SUCCESS,LOGIN_SUCCESS_2],condition: (state,action)=>{const{ every, some }=feedOperators(state,action)returnsome([({state, action})=>state.user.roles.indexOf('admin')!==-1,({state, action})=>state.user.roles.indexOf('superadmin')!==-1])},middleware: store=>next=>action=>{next({type: DISPLAY_MESSAGE,payload: 'You are logged in!'})returnnext(action)}}
Based on pair programming 14/09/2016 with @sebas5384:
The text was updated successfully, but these errors were encountered: