mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-31 02:28:09 +00:00 
			
		
		
		
	 9088f2b1b7
			
		
	
	9088f2b1b7
	
	
	
		
			
			* relationships, failing tests * remove old policies test to get tests passing * try adding back in
		
			
				
	
	
		
			21 lines
		
	
	
		
			770 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			770 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| /**
 | |
|  * Copyright (c) HashiCorp, Inc.
 | |
|  * SPDX-License-Identifier: BUSL-1.1
 | |
|  */
 | |
| 
 | |
| import Model, { hasMany, belongsTo, attr } from '@ember-data/model';
 | |
| import { alias } from '@ember/object/computed';
 | |
| import lazyCapabilities, { apiPath } from 'vault/macros/lazy-capabilities';
 | |
| 
 | |
| export default Model.extend({
 | |
|   approved: attr('boolean'),
 | |
|   requestPath: attr('string'),
 | |
|   requestEntity: belongsTo('identity/entity', { async: false, inverse: null }),
 | |
|   authorizations: hasMany('identity/entity', { async: false, inverse: null }),
 | |
| 
 | |
|   authorizePath: lazyCapabilities(apiPath`sys/control-group/authorize`),
 | |
|   canAuthorize: alias('authorizePath.canUpdate'),
 | |
|   configurePath: lazyCapabilities(apiPath`sys/config/control-group`),
 | |
|   canConfigure: alias('configurePath.canUpdate'),
 | |
| });
 |