refactor: 💡 update to allow state change & update edit action (#1797)
* refactor: 💡 update to allow state change & update edit action ✅ Closes: ICU-10078 * test: 💍 add more update and delete test cases * refactor: 💡 auth-method serializer * refactor: 💡 add secret input fields * refactor: 💡 remove changes to ldap auth method serializer --------- Co-authored-by: Dharini Jeeva <dharini@hashicorp.com>
This commit is contained in:
1 parent
790048a8d6
commit
3b284fac66
8 files changed
+426
-69
No files matched your search
@@ -20,6 +20,7 @@ export const TYPES_AUTH_METHOD = Object.freeze([
|
||||
* Enum options per auth method type and field.
|
||||
*/
|
||||
export const options = {
|
||||
state: ['inactive', 'active-private', 'active-public'],
|
||||
oidc: {
|
||||
signing_algorithms: [
|
||||
'RS256',
|
||||
@@ -33,7 +34,6 @@ export const options = {
|
||||
'PS512',
|
||||
'EdDSA',
|
||||
],
|
||||
state: ['inactive', 'active-private', 'active-public'],
|
||||
account_claim_maps: {
|
||||
to: ['sub', 'name', 'email'],
|
||||
},
|
||||
@@ -42,7 +42,6 @@ export const options = {
|
||||
account_attribute_maps: {
|
||||
to: ['fullName', 'email'],
|
||||
},
|
||||
state: ['inactive', 'active-private', 'active-public'],
|
||||
},
|
||||
};
|
||||
|
||||
@@ -118,9 +117,11 @@ export default class AuthMethodModel extends GeneratedAuthMethodModel {
|
||||
*/
|
||||
changeState(state, options = { adapterOptions: {} }) {
|
||||
const defaultAdapterOptions = {
|
||||
method: 'change-state',
|
||||
state,
|
||||
};
|
||||
if (this.isOIDC) {
|
||||
defaultAdapterOptions.method = 'change-state';
|
||||
}
|
||||
return this.save({
|
||||
...options,
|
||||
adapterOptions: {
|
||||
|
||||
Reference in new issue
Block a user