Search in sources :

Example 1 with TemplatePermissionsResponse

use of com.cloud.api.response.TemplatePermissionsResponse in project CloudStack-archive by CloudStack-extras.

the class ListTemplateOrIsoPermissionsCmd method execute.

@Override
public void execute() {
    List<String> accountNames = _templateService.listTemplatePermissions(this);
    Account account = UserContext.current().getCaller();
    boolean isAdmin = (isAdmin(account.getType()));
    TemplatePermissionsResponse response = _responseGenerator.createTemplatePermissionsResponse(accountNames, id, isAdmin);
    response.setResponseName(getCommandName());
    this.setResponseObject(response);
}
Also used : Account(com.cloud.user.Account) TemplatePermissionsResponse(com.cloud.api.response.TemplatePermissionsResponse)

Aggregations

TemplatePermissionsResponse (com.cloud.api.response.TemplatePermissionsResponse)1 Account (com.cloud.user.Account)1