Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
ngx-check-permission
Advanced tools
Angular library which checks the permission status and returns the permission status for the following api's .push, midi, camera, microphone, speaker, device-info, background-fetch, background-sync, bluetooth, persistent-storage, ambient-light-sensor, acc
Angular library which provides device permission status which are allowed for current device / system.
Import the servie to appropriate component / service file as follows.
import { NgxCheckPermissionService } from 'ngx-check-permission';
constructor( public permission: NgxCheckPermissionService ) {}
Getting all the permission status is async process use async function in order to receive the response
async ngOnInit() {
await this.checkPermissions();
}
public async checkPermissions() {
await this.permission.getAllPermissions().then((permisssions) => {
console.log(permisssions, '-----------');
});
}
[{
"permissionName": "geolocation",
"state": "prompt"
}, {
"permissionName": "notifications",
"state": "prompt"
}, {
"permissionName": "midi",
"state": "granted"
}, {
"permissionName": "camera",
"state": "prompt"
}, {
"permissionName": "microphone",
"state": "prompt"
}, {
"permissionName": "background-fetch",
"state": "granted"
}, {
"permissionName": "background-sync",
"state": "granted"
}, {
"permissionName": "persistent-storage",
"state": "prompt"
}, {
"permissionName": "accelerometer",
"state": "granted"
}, {
"permissionName": "gyroscope",
"state": "granted"
}, {
"permissionName": "magnetometer",
"state": "granted"
}, {
"permissionName": "display-capture",
"state": "prompt"
}]
Permission list:
'geolocation', 'notifications', 'push', 'midi', 'camera', 'microphone', 'speaker', 'device-info', 'background-fetch', 'background-sync', 'bluetooth', 'persistent-storage', 'ambient-light-sensor', 'accelerometer', 'gyroscope', 'magnetometer', 'clipboard', 'display-capture', 'nfc',
CDN Link for ngx-check-permission- https://unpkg.com/ngx-check-permission@0.0.3/bundles/ngx-check-permission.umd.js
This library was generated with Angular CLI version 13.0.0.
To use this package as a service npm i ngx-check-permission
install this on the root angular project .
Note: Don't forget to run this commend
npm i ngx-check-permission
on root folder or else it will throw error.
Thanks in advance
Coimbatore
FAQs
Angular library which checks the permission status and returns the permission status for the following api's .push, midi, camera, microphone, speaker, device-info, background-fetch, background-sync, bluetooth, persistent-storage, ambient-light-sensor, acc
The npm package ngx-check-permission receives a total of 10 weekly downloads. As such, ngx-check-permission popularity was classified as not popular.
We found that ngx-check-permission 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.