UNPKG

@river-build/sdk

Version:

For more details, visit the following resources:

23 lines 682 B
export class Entitlements { config; spaceDapp; constructor(config, spaceDapp) { this.config = config; this.spaceDapp = spaceDapp; } async isEntitled(spaceId, channelId, user, permission) { if (this.config.environmentId === 'local_multi_ne') { return true; } else if (channelId && spaceId) { return this.spaceDapp.isEntitledToChannel(spaceId, channelId, user, permission); } else if (spaceId) { return this.spaceDapp.isEntitledToSpace(spaceId, user, permission); } else { return true; } } } //# sourceMappingURL=entitlements.js.map