public static boolean isAdmin(Account account) { return s_accountService.isAdmin(account.getId()); }
final Integer apiLimitMax = Integer.valueOf(_configDao.getValue(Config.ApiLimitMax.key())); final boolean allowUserViewDestroyedVM = (QueryManagerImpl.AllowUserViewDestroyedVM.valueIn(caller.getId()) | _accountService.isAdmin(caller.getId())); final boolean allowUserExpungeRecoverVM = (UserVmManager.AllowUserExpungeRecoverVm.valueIn(caller.getId()) | _accountService.isAdmin(caller.getId()));
public boolean listInReadyState() { Account account = CallContext.current().getCallingAccount(); // It is account specific if account is admin type and domainId and accountName are not null boolean isAccountSpecific = (account == null || _accountService.isAdmin(account.getId())) && (getAccountName() != null) && (getDomainId() != null); // Show only those that are downloaded. TemplateFilter templateFilter = TemplateFilter.valueOf(getIsoFilter()); boolean onlyReady = (templateFilter == TemplateFilter.featured) || (templateFilter == TemplateFilter.selfexecutable) || (templateFilter == TemplateFilter.sharedexecutable) || (templateFilter == TemplateFilter.executable && isAccountSpecific) || (templateFilter == TemplateFilter.community); if (!onlyReady) { if (isReady() != null && isReady().booleanValue() != onlyReady) { onlyReady = isReady().booleanValue(); } } return onlyReady; }
@Override public long getEntityOwnerId() { Account account = CallContext.current().getCallingAccount(); if ((account == null) || _accountService.isAdmin(account.getId())) { if ((domainId != null) && (accountName != null)) { Account userAccount = _responseGenerator.findAccountByNameDomain(accountName, domainId); if (userAccount != null) { return userAccount.getId(); } } } if (account != null) { return account.getId(); } return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are // tracked }
public boolean listInReadyState() { Account account = CallContext.current().getCallingAccount(); // It is account specific if account is admin type and domainId and accountName are not null boolean isAccountSpecific = (account == null || _accountService.isAdmin(account.getId())) && (getAccountName() != null) && (getDomainId() != null); // Show only those that are downloaded. TemplateFilter templateFilter = TemplateFilter.valueOf(getTemplateFilter()); boolean onlyReady = (templateFilter == TemplateFilter.featured) || (templateFilter == TemplateFilter.selfexecutable) || (templateFilter == TemplateFilter.sharedexecutable) || (templateFilter == TemplateFilter.executable && isAccountSpecific) || (templateFilter == TemplateFilter.community); return onlyReady; }
@Override public long getEntityOwnerId() { Account account = CallContext.current().getCallingAccount(); if ((account == null) || _accountService.isAdmin(account.getId())) { if ((domainId != null) && (accountName != null)) { Account userAccount = _responseGenerator.findAccountByNameDomain(accountName, domainId); if (userAccount != null) { return userAccount.getId(); } } } if (account != null) { return account.getId(); } return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked }
@Override public long getEntityOwnerId() { Account account = CallContext.current().getCallingAccount(); if ((account == null) || _accountService.isAdmin(account.getId())) { if ((domainId != null) && (accountName != null)) { Account userAccount = _responseGenerator.findAccountByNameDomain(accountName, domainId); if (userAccount != null) { return userAccount.getId(); } } } if (account != null) { return account.getId(); } return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked }
@Override public long getEntityOwnerId() { Account account = CallContext.current().getCallingAccount(); if ((account == null) || _accountService.isAdmin(account.getId())) { if ((domainId != null) && (accountName != null)) { Account userAccount = _responseGenerator.findAccountByNameDomain(accountName, domainId); if (userAccount != null) { return userAccount.getId(); } } } if (account != null) { return account.getId(); } return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked } }
public boolean listInReadyState() { final Account account = CallContext.current().getCallingAccount(); // It is account specific if account is admin type and domainId and accountName are not null final boolean isAccountSpecific = (account == null || _accountService.isAdmin(account.getId())) && (getAccountName() != null) && (getDomainId() != null); // Show only those that are downloaded. final TemplateFilter templateFilter = TemplateFilter.valueOf(getIsoFilter()); boolean onlyReady = (templateFilter == TemplateFilter.featured) || (templateFilter == TemplateFilter.selfexecutable) || (templateFilter == TemplateFilter.sharedexecutable) || (templateFilter == TemplateFilter.executable && isAccountSpecific) || (templateFilter == TemplateFilter.community); if (!onlyReady) { if (isReady() != null && isReady().booleanValue() != onlyReady) { onlyReady = isReady().booleanValue(); } } return onlyReady; }
public boolean listInReadyState() { final Account account = CallContext.current().getCallingAccount(); // It is account specific if account is admin type and domainId and accountName are not null final boolean isAccountSpecific = (account == null || _accountService.isAdmin(account.getId())) && (getAccountName() != null) && (getDomainId() != null); // Show only those that are downloaded. final TemplateFilter templateFilter = TemplateFilter.valueOf(getTemplateFilter()); final boolean onlyReady = (templateFilter == TemplateFilter.featured) || (templateFilter == TemplateFilter.selfexecutable) || (templateFilter == TemplateFilter.sharedexecutable) || (templateFilter == TemplateFilter.executable && isAccountSpecific) || (templateFilter == TemplateFilter.community); return onlyReady; }
@Override public long getEntityOwnerId() { final Account account = CallContext.current().getCallingAccount(); if ((account == null) || _accountService.isAdmin(account.getId())) { if ((domainId != null) && (accountName != null)) { final Account userAccount = _responseGenerator.findAccountByNameDomain(accountName, domainId); if (userAccount != null) { return userAccount.getId(); } } } if (account != null) { return account.getId(); } return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked }
@Override public long getEntityOwnerId() { final Account account = CallContext.current().getCallingAccount(); if ((account == null) || _accountService.isAdmin(account.getId())) { if ((domainId != null) && (accountName != null)) { final Account userAccount = _responseGenerator.findAccountByNameDomain(accountName, domainId); if (userAccount != null) { return userAccount.getId(); } } } if (account != null) { return account.getId(); } return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked } }
@Override public long getEntityOwnerId() { final Account account = CallContext.current().getCallingAccount(); if ((account == null) || _accountService.isAdmin(account.getId())) { if ((domainId != null) && (accountName != null)) { final Account userAccount = _responseGenerator.findAccountByNameDomain(accountName, domainId); if (userAccount != null) { return userAccount.getId(); } } } if (account != null) { return account.getId(); } return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked } }
if ((caller == null) || _accountService.isAdmin(caller.getId())) { isAdmin = true;