MCPcopy Index your code
hub / github.com/scality/cloudserver / addGrantee

Method addGrantee

tests/unit/helpers.js:475–491  ·  view source on GitHub ↗
(type, value, permission, displayName)

Source from the content-addressed store, hash-verified

473 this.Owner.ID = ownerID;
474 }
475 addGrantee(type, value, permission, displayName) {
476 const grant = {
477 Grantee: {
478 Type: type,
479 DisplayName: displayName,
480 },
481 Permission: permission,
482 };
483 if (type === 'AmazonCustomerByEmail') {
484 grant.Grantee.EmailAddress = value;
485 } else if (type === 'CanonicalUser') {
486 grant.Grantee.ID = value;
487 } else if (type === 'Group') {
488 grant.Grantee.URI = value;
489 }
490 this.AccessControlList.push(grant);
491 }
492 getXml() {
493 const xml = [];
494

Callers 1

objectPutACL.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected