No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Problem con boot and acls

    Help
    2
    3
    118
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jhon last edited by jhon

      Hello

      I am implementing vue-acl (https://www.npmjs.com/package/vue-acl) in a project:

      I have built a boot:

      import Vue from 'vue'
      import { AclInstaller, AclCreate, AclRule } from 'vue-acl'
      
      Vue.use(AclInstaller)
      
      export default async ({ router, Vue, store }) => {
        const myAcls = new AclCreate({
          initial: 'deny',
          notfound: {
            path: '/error',
            forwardQueryParams: true
          },
          router,
          acceptLocalRules: true,
          globalRules: {
            isSuperAdmin: new AclRule('superadmin').generate(),
            isAdmin: new AclRule('administrador').generate(),
            isGestor: new AclRule('gestor').generate(),
            isMiembro: new AclRule('miembro').generate(),
            isPublic: new AclRule('public').generate(),
            isDeny: new AclRule('deny').generate()
          },
          middleware: async acl => {
            acl.change('superadmin')
          }
        })
        console.log('Arrancando las acl')
        return myAcls
      }
      

      and I need to access to this.$acl for permission update, but, $acl is not available from the store.

      826b68cf-8bb0-46d9-a2bb-66cf1e9057ca-imagen.png

      some idea, Thanks
      Sorry for my english

      1 Reply Last reply Reply Quote 0
      • patryckx
        patryckx last edited by

        Is your boot declared in quasar.conf.js?

        1 Reply Last reply Reply Quote 0
        • J
          jhon last edited by

          Yep

          boot: [
          ‘axios’,
          ‘router’,
          ‘i18n’,
          ‘acls’ <------
          ],

          1 Reply Last reply Reply Quote 0
          • First post
            Last post