Skip to content

Instantly share code, notes, and snippets.

@mblarsen
Created Oct 25, 2017
Embed
What would you like to do?
import Vue from 'vue'
import Acl from 'vue-browser-acl'
Vue.use(Acl, user, (acl) => {
acl.rule(view, Post)
acl.rule([edit, delete], Post, (user, post) => post.userId === user.id)
acl.rule('moderate', Post, (user) => user.isModerator())
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment