@availity/authorizations-core
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -6,2 +6,10 @@ # Change Log | ||
## [1.0.6](https://github.com/Availity/sdk-js/compare/@availity/authorizations-core@1.0.5...@availity/authorizations-core@1.0.6) (2020-01-03) | ||
**Note:** Version bump only for package @availity/authorizations-core | ||
## [1.0.5](https://github.com/Availity/sdk-js/compare/@availity/authorizations-core@1.0.4...@availity/authorizations-core@1.0.5) (2019-04-17) | ||
@@ -8,0 +16,0 @@ |
{ | ||
"name": "@availity/authorizations-core", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Base configurations for Availity Authorizations", | ||
"main": "src/index.js", | ||
"main": "lib/index.js", | ||
"module": "src/index.js", | ||
"author": "Kasey Powers <kasey.powers@availity.com>", | ||
@@ -11,3 +12,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "fb94eef197f4f9be7a70eedf053d5550ef4e619b" | ||
"gitHead": "239e4a2312aec4d16ff2ca3d219faae7570c0ccd" | ||
} |
# Authorizations Core | ||
A package providing a base authorizations class to help check which permissions a user has. | ||
> A package providing a base authorizations class to help check which permissions a user has. | ||
## Install | ||
`npm install @availity/authorizations-core` | ||
[](https://www.npmjs.com/package/@availity/authorizations-core) | ||
## Configuration | ||
`AvAuthorizations` requires `AvPermissions`, `AvRegions`, and a Promise lib. | ||
`AvPermissions` and `AvRegions` can be found in [Api-Core](../api-core) but can be any objects that have `getPermissions()` and `getCurrentRegion()` promises respectively. | ||
```javascript | ||
new AvAuthorizations(AvPermissions, AvRegions, promise); | ||
``` | ||
## Methods | ||
For all methods, if no region is passed in, defaults to current region. | ||
### isAuthorized | ||
`isAuthorized(permissionId, region)` resolves to true or false if the current user has access to this permissionId in this region. | ||
### `isAnyAuthorized` | ||
`isAnyAuthorized(permissionIds, region)` resolves to true or false if the current user has access to any of these permissionIds in this region. | ||
### `getPermission` | ||
`getPermission(permissionId, region)` resolves to the permission object for this permissionId in this region. | ||
### `getPermissions` | ||
`getPermissions(permissionIds, region)` resolves to an array of permission objects for these permissionIds in this region. | ||
### `getOrganizations` | ||
`getOrganizations(permissionId, region)` resolves to the organizations array for this permissionId, will be empty if not authorized | ||
### `getPayers` | ||
`getPayers(permissionId, organizationId, region)` will check permissionId for an organization with `organizationId` and resolve to its `resources` or an empty array. | ||
## Authors | ||
**Kasey Powers** | ||
* [kaseyepowers@gmail.com](kaseyepowers@gmail.com) | ||
## License | ||
[MIT](../../LICENSE) | ||
## [Documentation](https://availity.github.io/sdk-js/api/authorizations) |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
22966
8
1