
Product
Introducing Custom Tabs for Org Alerts
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.
@bondsports/permissions
Advanced tools
This package centralizes and organizes all permissions used across the application into well-structured modules. It ensures consistency between frontend and backend implementations, and will hopefully make it easier to find and use permissions.
calendar,
commerce).permissions object for convenient access.npm install @bond-sports/permissions
All permissions are aggregated in a central permissions object, which can be imported for global access:
import permissions from '@bond-sports/permissions';
console.log(permissions.calendar.reservation.create); // Output: "calendar.reservation.create"
console.log(permissions.commerce.kiosk.view); // Output: "commerce.kiosk.view"
To add new permissions:
const CalendarPermissions = {
reservation: {
create: 'calendar.reservation.create',
edit: 'calendar.reservation.edit',
},
slots: {
sessions: {
checkIn: 'calendar.slots.sessions.checkIn',
},
},
} as const;
export default CalendarPermissions;
Use permissions in backend services for access control:
import permissions from '@bond-sports/permissions';
// Example: Checking user permissions in a middleware
function hasPermission(userPermissions: string[], requiredPermission: string): boolean {
return userPermissions.includes(requiredPermission);
}
const userPermissions = ['calendar.reservation.create'];
const requiredPermission = permissions.calendar.reservation.create;
if (hasPermission(userPermissions, requiredPermission)) {
console.log('Permission granted');
} else {
console.log('Permission denied');
}
Control UI components based on user permissions:
import permissions from '@bond-sports/permissions';
function PermissionsWrapper({ requiredPermission, children, userPermissions }) {
if (userPermissions.includes(requiredPermission)) {
return <>{children}</>;
}
return null;
}
// Usage in a React component
<PermissionsWrapper
requiredPermission={permissions.commerce.kiosk.view}
userPermissions={['commerce.kiosk.view']}
>
<button>Access Kiosk</button>
</PermissionsWrapper>;
git clone git@github.com:Bond-Sports/permissions.git
npm install
Add or modify permissions in the appropriate module files.
Commit and push your changes:
git commit -m "Add new permissions for [feature]"
git push
This package is automatically published when updates are pushed to specific branches (e.g., develop, staging, master) via GitHub Actions.
FAQs
Bondsports internal permissions strings package
The npm package @bondsports/permissions receives a total of 970 weekly downloads. As such, @bondsports/permissions popularity was classified as not popular.
We found that @bondsports/permissions demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 12 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.

Product
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.