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

    How to apply access control to different routes in quasar?

    Framework
    4
    4
    2085
    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.
    • H
      heman last edited by

      There s a plugin called vue-acl which actually allows access control.But it cant be used with quasar

      1 Reply Last reply Reply Quote 0
      • rstoenescu
        rstoenescu Admin last edited by

        If it can be used with Vue Router 2.x then there’s nothing stopping it from working with Quasar as it doesn’t interfere at all.
        What I’d recommend is doing your own access control. Read Vue Router documentation. It’s easy: https://router.vuejs.org/en/advanced/navigation-guards.html

        1 Reply Last reply Reply Quote -1
        • G
          Gonzalo2683 last edited by

          530/5000
          The answer given by admin is not very explanatory. I am having the same problem as accessing the status in the routes.js file, I am using the SSR version.

          What I did was import the store in the routes.js file but this apparently creates a new store instance and the state settings through actions and mutations do not seem to work.

          How would be the correct way to reference the store in the routes.js file in order to use navigation guards?

          1 Reply Last reply Reply Quote 0
          • G
            genyded last edited by

            6/1000000
            The question given by the asker is not very explanatory. Can you paste some code on how/where the imports are and now the library is integrated? Also you may want to check out vuex router-sync if you haven’t already.

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