use of com.jd.blockchain.ledger.UserPrivilegeSet in project jdchain-core by blockchain-jd-com.
the class ContractLedgerQueryService method getUserPrivileges.
@Override
public UserPrivilegeSet getUserPrivileges(String userAddress) {
LedgerDataSet ledgerDataQuery = ledgerQuery.getLedgerDataSet();
LedgerAdminDataSet previousAdminDataset = ledgerDataQuery.getAdminDataset();
LedgerSecurityManager securityManager = new LedgerSecurityManagerImpl(previousAdminDataset.getAdminSettings().getRolePrivileges(), previousAdminDataset.getAdminSettings().getAuthorizations(), previousAdminDataset.getParticipantDataset(), ledgerDataQuery.getUserAccountSet());
UserPrivilegeSet userPrivilegeSet = securityManager.getUserRolesPrivilegs(Bytes.fromBase58(userAddress));
return userPrivilegeSet;
}
use of com.jd.blockchain.ledger.UserPrivilegeSet in project jdchain-core by blockchain-jd-com.
the class UncommittedLedgerQueryService method getUserPrivileges.
@Override
public UserPrivilegeSet getUserPrivileges(String userAddress) {
LedgerDataSet ledgerDataQuery = transactionContext.getDataset();
LedgerAdminDataSet previousAdminDataset = ledgerDataQuery.getAdminDataset();
LedgerSecurityManager securityManager = new LedgerSecurityManagerImpl(previousAdminDataset.getAdminSettings().getRolePrivileges(), previousAdminDataset.getAdminSettings().getAuthorizations(), previousAdminDataset.getParticipantDataset(), ledgerDataQuery.getUserAccountSet());
UserPrivilegeSet userPrivilegeSet = securityManager.getUserRolesPrivilegs(Bytes.fromBase58(userAddress));
return userPrivilegeSet;
}
Aggregations