Skip to content

Commit

Permalink
feat: scopes Form is broken -- missing most important field (id) #305
Browse files Browse the repository at this point in the history
  • Loading branch information
duttarnab committed Jul 19, 2022
1 parent c1c7e8b commit 67ee7a3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 27 deletions.
3 changes: 2 additions & 1 deletion admin-ui/app/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"consent_gathering_scripts": "Consent Gathering Scripts",
"custom_properties": "Custom Properties (key/values)",
"data_type": "Data Type",
"default_acr": "Default Authentication Method(Acr)",
"default_acr": "Default Authentication Method (ACR)",
"default_bucket": "Default Bucket",
"default_cleanup_batch_size": "Default Cleanup Batch Size",
"default_put_expiration": "Default Put Expiration",
Expand Down Expand Up @@ -327,6 +327,7 @@
"add_sql": "Add SQL"
},
"placeholders": {
"id": "Enter id",
"action_commit_message": "Provide the reason of this change",
"activate_ldap_configuration": "Activate ldap configuration",
"client_description": "Enter the client description",
Expand Down
3 changes: 2 additions & 1 deletion admin-ui/app/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"consent_gathering_scripts": "Scripts de collecte de consentement",
"custom_properties": "Propriétés personnalisées (clé/valeurs)",
"data_type": "Type de données",
"default_acr": "Méthode d'authentification par défaut (Acr)",
"default_acr": "Méthode d'authentification par défaut (ACR)",
"default_bucket": "Seau par défaut",
"default_cleanup_batch_size": "Taille du lot de nettoyage par défaut",
"default_put_expiration": "Expiration de vente par défaut",
Expand Down Expand Up @@ -271,6 +271,7 @@
"view_attribute": "Afficher l'attribut"
},
"placeholders": {
"id": "Enter id",
"action_commit_message": "Fournir la raison de ce changement",
"activate_ldap_configuration": "Activer la configuration LDAP",
"client_description": "Entrez la description du client",
Expand Down
3 changes: 2 additions & 1 deletion admin-ui/app/locales/pt/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"consent_gathering_scripts": "Scripts de coleta de consentimento",
"custom_properties": "Propriedades personalizadas (chave / valores)",
"data_type": "Tipo de dados",
"default_acr": "Método de autenticação padrão (Acr)",
"default_acr": "Método de autenticação padrão (ACR)",
"default_bucket": "Bucket padrão",
"default_cleanup_batch_size": "Tamanho de lote de limpeza padrão",
"default_put_expiration": "Expiração de venda padrão",
Expand Down Expand Up @@ -270,6 +270,7 @@
"view_attribute": "Ver atributo"
},
"placeholders": {
"id": "Enter id",
"action_commit_message": "Forneça o motivo desta mudança",
"activate_ldap_configuration": "Ativar configuração ldap",
"client_description": "Insira a descrição do cliente",
Expand Down
40 changes: 16 additions & 24 deletions admin-ui/plugins/auth-server/components/Scopes/ScopeForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function ScopeForm({ scope, scripts, attributes, handleSubmit }) {
const result = Object.assign(scope, values)
result['id'] = result.id
result['attributes'].showInConfigurationEndpoint =
scope.attributes.showInConfigurationEndpoint
scope.attributes.showInConfigurationEndpoint
result['attributes'].spontaneousClientId =
scope.attributes.spontaneousClientId
result['attributes'].spontaneousClientScopes =
Expand Down Expand Up @@ -213,7 +213,7 @@ function ScopeForm({ scope, scripts, attributes, handleSubmit }) {
formik={formik}
value={scope.defaultScope}
doc_category={SCOPE}
/> }
/>}
<GluuToogleRow
label="fields.show_in_configuration_endpoint"
name="attributes.showInConfigurationEndpoint"
Expand Down Expand Up @@ -250,27 +250,19 @@ function ScopeForm({ scope, scripts, attributes, handleSubmit }) {
</FormGroup>
</GluuTooltip>
{showDynamicPanel && (
<Accordion className="mb-2 b-primary" initialOpen>
<Accordion.Header className="text-primary">
{t('fields.claims').toUpperCase()}
</Accordion.Header>
<Accordion.Body>
<FormGroup row> </FormGroup>
<GluuTypeAheadForDn
name="dynamicScopeScripts"
label="fields.dynamic_scope_scripts"
formik={formik}
value={getMapping(
scope.dynamicScopeScripts,
dynamicScopeScripts,
)}
options={dynamicScopeScripts}
doc_category={SCOPE}
/>
</Accordion.Body>
</Accordion>
<GluuTypeAheadForDn
name="dynamicScopeScripts"
label="fields.dynamic_scope_scripts"
formik={formik}
value={getMapping(
scope.dynamicScopeScripts,
dynamicScopeScripts,
)}
options={dynamicScopeScripts}
doc_category={SCOPE}
/>
)}
{showClaimsPanel && (
{(showClaimsPanel || showDynamicPanel) && (
<Accordion className="mb-2 b-primary" initialOpen>
<Accordion.Header className="text-primary">
{t('fields.claims').toUpperCase()}
Expand Down Expand Up @@ -351,8 +343,8 @@ function ScopeForm({ scope, scripts, attributes, handleSubmit }) {
</Form>
)}
</Formik>
</Container>
</Container >
)
}

export default ScopeForm
export default ScopeForm

0 comments on commit 67ee7a3

Please sign in to comment.