
Security News
Socket Integrates With Bun 1.3’s Security Scanner API
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
@contiamo/resource-role-assigner
Advanced tools
This project allows our UIs to assign roles for a given user, group or API token (called a _principal_) _on_ a given resource: like a Bundle in Labs or a Data Source in Pantheon.
This project allows our UIs to assign roles for a given user, group or API token (called a principal) on a given resource: like a Bundle in Labs or a Data Source in Pantheon.
In essence, this tool (expressed as a Modal window), allows a user to "make Peter an Admin of Catalog 123" in a user-friendly way.
npm install @contiamo/resource-role-assigner
import React, { useState } from "react"
import ResourceRoleAssigner from "@contiamo/resource-role-assigner"
const MyComponent = ({ catalog, dataSource, me }) => {
const [modalState, setModalState] = useState(false);
const availableRoles: ["Reader", "Editor", "Viewer"] = ["Reader", "Editor", "Viewer];
return (<ResourceRoleAssigner
onClose={() => setModalState(false)}
defaultRole="Editor"
roles={availableRoles}
resource={{
name: catalog.name,
permissionsUrl: `${getConfig("pantheon.backend")}/catalogs/${catalog.id}/dataSources/${dataSource.id}/permissions`,
requestOptions: {
headers: {
"x-double-cookie": Cookies.get("double-cookie"),
},
credentials: "include",
},
}}
idp={{
url: `${getConfig("auth")}/v2/${me.tenant.id}`,
usersUrl: `${getConfig("auth")}/v2/tenants/${me.tenant.id}/users`,
groupsUrl: `${getConfig( "auth")}/v2/tenants/${me.tenant.id}/realms/${catalog.id}/groups`,
}}
/>)
}
This project uses Operational Scripts and has a familiar tooling set up. To contribute to this project, simply:
git clone
this repo,cd resource-role-assigner
npm install
code .
or vim
or spin up your editor of choice.As usual, issues and pull requests are enabled in case any help is needed or discussions are to be had.
Happy coding!
FAQs
This project allows our UIs to assign roles for a given user, group or API token (called a _principal_) _on_ a given resource: like a Bundle in Labs or a Data Source in Pantheon.
We found that @contiamo/resource-role-assigner demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.
Security News
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.