# vue-module-acl

> permission, module, acl, vue, role, rule

Latest version **1.0.2** (published 2021-08-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-module-acl
pnpm add vue-module-acl
yarn add vue-module-acl
bun add vue-module-acl
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-08-27 |
| First published | 2021-08-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | NatCoop |
| Maintainers | phuongnd1312 |
| Keywords | permission, module, acl, vue, role, rule |

## Links

- npm: https://www.npmjs.com/package/vue-module-acl
- Repository: https://github.com/NatCOOPJS/vue-module-acl
- Homepage: https://github.com/NatCOOPJS/vue-module-acl#readme
- Issues: https://github.com/NatCOOPJS/vue-module-acl/issues
- npm.io page: https://npm.io/package/vue-module-acl

## Recent versions

- 1.0.2 (latest) — 2021-08-27
- 1.0.1 — 2021-08-15
- 1.0.0 — 2021-08-14

## README

# vue-module-acl

## main.js

```js
import NatAcl from 'vue-module-acl'

Vue.use(NatAcl, {
  router: router, init: [
    'news.show',
    'news.post',
  ], fail: '/error'
})

const routes = [
  {
    path: '/',
    component: require('./components/home.vue'),
  },
  {
    path: '/news',
    component: require('./components/news.vue'),
    meta: { permission: { module: 'news', fail: '/error' } }
  },
  {
    path: '/error',
    component: require('./components/error.vue')
  },
]
```

## file.vue

```html
<button v-can="'news.post'">Post News</button>
```

```js
this.$canShow('news.post')
```

---
_Source: https://npm.io/package/vue-module-acl · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
