Skip to content

Commit

Permalink
Remove surplus comments
Browse files Browse the repository at this point in the history
  • Loading branch information
peterMuriuki committed Sep 20, 2023
1 parent c84a1cf commit dd1846a
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions packages/rbac/src/adapters/keycloakAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,33 +71,3 @@ export const adapter: RbacAdapter = (roles: KeycloakRoleData = defaultRoleData)

return UserRole.combineRoles(allRoles);
};

/**
* Next step. Update/create a way to store this such that it is accessible globally- add it to some global state.
*
* IDEA1:
* - Update sessionReducer to be able to store this Role object as well.
*
* IDEA2:
* - create a context wrapper that supplies the Role object, will be a wrapper around session reducer.
*
* IDEA3:
* - Create a rbac dux module(This will be part of the adapter) - create an action that creates Role and adds it to the store.
* - Where/when should the action be callled.
* - action can be passed as a sideEffect to the gatekeeper, but its derived information.
*
* - Simplest way forward is to write a selector that reads the role information and returns the Role object.
*/

// /**
// * @param state - the redux state.
// */
// export function getUserRole(state: Store) {
// // needs the store.
// // needs the session-reducer.
// // part of the adapter.
// const extraData = getExtraData(state);
// const roles = extraData.roles;

// return keycloakAdapter(roles);
// }

0 comments on commit dd1846a

Please sign in to comment.