Skip to content

Commit

Permalink
fix(admin-ui): uma fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mjatin-dev committed Aug 5, 2022
1 parent e8dddf8 commit e60ee71
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions admin-ui/plugins/auth-server/components/Scopes/ScopeForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ function ScopeForm({ scope, scripts, attributes, handleSubmit }) {

umaAuthorizationPolicies = scripts
.filter((item) => item.scriptType == 'UMA_RPT_POLICY')
.filter((item) => item.enabled)
.map((item) => ({ dn: item.dn, name: item.name }))

umaResourcesScript = umaResources.map((item) => ({
Expand All @@ -83,7 +82,7 @@ function ScopeForm({ scope, scripts, attributes, handleSubmit }) {
const [showSpontaneousPanel, handleShowSpontaneousPanel] = useState(
scope.scopeType === 'spontaneous',
)
const [showUmaPanel, handleShowUmaPanel] = useState(scope.scopeType === 'UMA')
const [showUmaPanel, handleShowUmaPanel] = useState(scope.scopeType === 'uma')

useEffect(() => {
if (showSpontaneousPanel) {
Expand Down Expand Up @@ -118,7 +117,7 @@ function ScopeForm({ scope, scripts, attributes, handleSubmit }) {
} else {
handleShowSpontaneousPanel(false)
}
if (type && type === 'UMA') {
if (type && type === 'uma') {
handleShowUmaPanel(true)
} else {
handleShowUmaPanel(false)
Expand Down Expand Up @@ -160,6 +159,10 @@ function ScopeForm({ scope, scripts, attributes, handleSubmit }) {
return history.push(`/auth-server/client/edit:` + client_id.substring(0, 4))
}

useEffect(() => {
console.log('THE SCOPE', scope)
}, [scope])

return (
<Container>
<Formik
Expand Down Expand Up @@ -310,7 +313,7 @@ function ScopeForm({ scope, scripts, attributes, handleSubmit }) {
<option value="oauth">OAuth</option>
<option value="openid">OpenID</option>
<option value="dynamic">Dynamic</option>
<option value="UMA">UMA</option>
<option value="uma">UMA</option>
</CustomInput>
</InputGroup>
</Col>
Expand Down

0 comments on commit e60ee71

Please sign in to comment.