Skip to content

Commit

Permalink
Merge pull request wso2#448 from chanaka3d/mainrc
Browse files Browse the repository at this point in the history
Fixing API visibility restriction base on roles not cleared properly issue
  • Loading branch information
rmsamitha authored Mar 10, 2023
2 parents f6779d3 + c87f70f commit 43229eb
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ function configReducer(state, configAction) {
case 'responseCachingEnabled':
case 'cacheTimeout':
case 'enableSchemaValidation':
case 'visibility':
case 'maxTps':
case 'categories':
case 'tags':
Expand Down Expand Up @@ -242,6 +241,12 @@ function configReducer(state, configAction) {
return { ...state, [action]: value };
case 'policies':
return { ...state, [action]: value };
case 'visibility':
if (nextState[action] !== value && value !== 'RESTRICTED') {
nextState.visibleRoles = [];
}
nextState[action] = value;
return nextState;
default:
return state;
}
Expand Down

0 comments on commit 43229eb

Please sign in to comment.