Add used by information.
This commit is contained in:
parent
4ea568ea17
commit
0ba8d922ef
7 changed files with 47 additions and 7 deletions
|
|
@ -29,14 +29,17 @@ import org.jgrapes.core.Event;
|
|||
public class GetDisplayPassword extends Event<String> {
|
||||
|
||||
private final VmDefinition vmDef;
|
||||
private final String user;
|
||||
|
||||
/**
|
||||
* Instantiates a new returns the display secret.
|
||||
* Instantiates a new request for the display secret.
|
||||
*
|
||||
* @param vmDef the vm name
|
||||
* @param user the requesting user
|
||||
*/
|
||||
public GetDisplayPassword(VmDefinition vmDef) {
|
||||
public GetDisplayPassword(VmDefinition vmDef, String user) {
|
||||
this.vmDef = vmDef;
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -48,6 +51,15 @@ public class GetDisplayPassword extends Event<String> {
|
|||
return vmDef;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the id of the user who has requested the password.
|
||||
*
|
||||
* @return the string
|
||||
*/
|
||||
public String user() {
|
||||
return user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the password. May only be called when the event is completed.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue