![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@availity/authorize
Advanced tools
Check user permissions to see if the current user is authorized to see your content.
Check user permissions to see if the current user is authorized to see your content.
npm install @availity/authorize @availity/api-axios @availity/api-core axios --save
import React from 'react';
import Authorize from '@availity/authorize';
// ...
<Authorize permissions="1234">
{/* stuff to render if the user is authorized with permission indicated above */}
</Authorize>
// ...
Component which validates the user's permissions to determine if they should be able to see the children content.
permissions
: String, number, or an array containing strings/numbers or an array containing strings/numbers. Required.
'1234'
['1234', '2345', ['3456', '4567'], ['5678', '6789']]
. The items in deep/nested array indicate permission IDs which must all be granted to the user to be consider authorized, they act as "and". The items in the top array act as 'or', if any are granted to the user the user would be consider authorized. The example ['1234', '2345', ['3456', '4567'], ['5678', '6789']]
would be similar '1234' || '2345' || ('3456' && '4567') || ('5678' && '6789')
loader
: Boolean or node. Optional, default: true
. When true
, BlockUi
will be used when loading the permissions. When a node
, that node will be render instead of BlockUi
when loading the permissions. When false
, nothing will be render when loading the permissions.organizationId
: String. Optional, when present, the permission will be validated to ensure it is assigned to the organization.customerId
: String. Optional, when present, the permission will be validated to ensure it is assigned to the customer. Note: Cannot be used in combination with the organizationId
propregion
: String or boolean. Optional, default: true
. When a string, the permission will be validated to ensure it is assigned in the region. When true, the current region will be used.unauthorized
: Node. Optional. The content which will be render when the user does not have the permissions required.children
: Node. Required. The content which will be render when the user does have the permissions required.negate
: Boolean. Optional, default false
. negation the authorization (if the user does have the permissions specified, they will be "unauthorized" (shown the unauthorized
prop content) and if the do not have the permissions specified, they will be "authorized" and able to see the children content)import React from 'react';
import Authorize from '@availity/authorize';
// ...
<Authorize permissions={['1234', '2345', ['3456', '4567'], ['5678', '6789']]} organizationId="1495">
{/* ... */}
</Authorize>
// ...
FAQs
Check user permissions to see if the current user is authorized to see your content.
The npm package @availity/authorize receives a total of 75 weekly downloads. As such, @availity/authorize popularity was classified as not popular.
We found that @availity/authorize demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.