
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@availity/authorizations-axios
Advanced tools
A package providing a base authorizations class to help check which permissions a user has.
npm install @availity/authorizations-axios
yarn add @availity/authorizations-axios
AvAuthorizations uses AvPermissions, and AvRegions from Api-Axios. To configure their default options, AvAuthorizations takes in an options object that is passed onto them.
import AvAuthorizations from '@availity/authorizations-axios';
new AvAuthorizations(config);
For all methods, if no region is passed in, defaults to current region.
isAuthorized(permissionId, region) resolves to true or false if the current user has access to this permissionId in this region.
isAnyAuthorizedisAnyAuthorized(permissionIds, region) resolves to true or false if the current user has access to any of these permissionIds in this region.
getPermissiongetPermission(permissionId, region) resolves to the permission object for this permissionId in this region.
getPermissionsgetPermissions(permissionIds, region) resolves to an array of permission objects for these permissionIds in this region.
getOrganizationsgetOrganizations(permissionId, region) resolves to the organizations array for this permissionId, will be empty if not authorized
getPayersgetPayers(permissionId, organizationId, region) will check permissionId for an organization with organizationId and resolve to its resources or an empty array.
Kasey Powers
FAQs
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
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.