Sha256: 47b9209afcde236ea35dcd719993d63e4da5d2a6cb382a0822f974076eb00180

Contents?: true

Size: 521 Bytes

Versions: 1

Compression:

Stored size: 521 Bytes

Contents

export const c = {
    MEMBERS_EXECUTE: 'MEMBERS_EXECUTE',
    MEMBERS_UPDATE: 'MEMBERS_UPDATE'
};

const encode = window.encodeURIComponent;

export function fetch(rmanager, assetType, type, id) {
    var privilege = '';

    if (type === c.MEMBERS_EXECUTE) {
        privilege = 'execute';
    } else if (type === c.MEMBERS_UPDATE) {
        privilege = 'update';
    }

    return rmanager
        .callServer('GET', `/api/authz/\${account}/roles/allowed_to/${privilege}/${assetType}/${encode(id)}`)
        .end();
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
conjur-asset-ui-1.6.0 app/src/clients/members.js