mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-30 18:17:55 +00:00 
			
		
		
		
	backport of UI: Allow token configuration tune (#24150)
Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com>
This commit is contained in:
		 hc-github-team-secure-vault-core
					hc-github-team-secure-vault-core
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							30e552170f
						
					
				
				
					commit
					afa2bb3922
				
			
							
								
								
									
										3
									
								
								changelog/24147.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								changelog/24147.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | ```release-note:bug | ||||||
|  | ui: Fix error when tuning token auth configuration within namespace | ||||||
|  | ``` | ||||||
| @@ -32,7 +32,7 @@ export default AuthConfigComponent.extend({ | |||||||
|       data.description = this.model.description; |       data.description = this.model.description; | ||||||
|  |  | ||||||
|       // token_type should not be tuneable for the token auth method. |       // token_type should not be tuneable for the token auth method. | ||||||
|       if (this.model.type === 'token') { |       if (this.model.methodType === 'token') { | ||||||
|         delete data.token_type; |         delete data.token_type; | ||||||
|       } |       } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -151,4 +151,20 @@ module('Acceptance | auth backend list', function (hooks) { | |||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   }); |   }); | ||||||
|  |  | ||||||
|  |   test('enterprise: token config within namespace', async function (assert) { | ||||||
|  |     const ns = 'ns-wxyz'; | ||||||
|  |     await runCmd(`write sys/namespaces/${ns} -f`); | ||||||
|  |     await authPage.loginNs(ns); | ||||||
|  |     // go directly to token configure route | ||||||
|  |     await visit('/vault/settings/auth/configure/token/options'); | ||||||
|  |     await fillIn('[data-test-input="description"]', 'My custom description'); | ||||||
|  |     await click('[data-test-save-config="true"]'); | ||||||
|  |     assert.strictEqual(currentURL(), '/vault/access', 'successfully saves and navigates away'); | ||||||
|  |     await click('[data-test-auth-backend-link="token"]'); | ||||||
|  |     assert | ||||||
|  |       .dom('[data-test-row-value="Description"]') | ||||||
|  |       .hasText('My custom description', 'description was saved'); | ||||||
|  |     await runCmd(`delete sys/namespaces/${ns}`); | ||||||
|  |   }); | ||||||
| }); | }); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user