dystcz / nuxt-permissions Goto Github PK
View Code? Open in Web Editor NEWNuxt module for permission management
License: MIT License
Nuxt module for permission management
License: MIT License
Could you please specify license for this project? otherwise can't be used by any public facing project. thanks
edit: I see it is specified in package.json, but still would be nice to set it on github as well.
When I enter into a page from url instead navigate from project, Nuxt 3 throw a 404 page, even though the page does exist
It would be great to have a composable that lets us access the roles or permissions to use it in our logic, for example, to check if a user can execute one function.
The directives are great for hiding or showing UI parts, but we are limited if we need to execute some specific condition.
For example, let's assume users can see the list of permissions, but if they don't have the permission update_permissions,
they shouldn't switch the checkboxes, only see them. Something like the following
<input
v-model="rolesAndPermissions[action]"
type="checkbox"
class="form-checkbox"
:disabled="!user.permissions.includes('update_roles')"
/>
hi,
this is not a issue but are you still developing this module? i was thinking to use this module but i saw you said not ready for production.
So if the user does not have the required permissions, he is redirected to /. Can we have this path dynamic and changeable from package configurations ?
Found you are using cookies for store permissions and roles, it will cause sending large cookie errors.
Adding definePageMeta({ middleware: ['nuxt-permissions'] })
to a page, causes it to return with a 404 error. It does the same if I include my auth.global.ts
as middleware (it is currently completely empty anyway). I've made sure to disable SSR.
It's a brand new project and that's pretty much all I've got so far. I'm really curious as to why this doesn't work.
package.json:
{
"name": "nuxt-app",
"private": true,
"type": "module",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"dev:host": "nuxt dev --host",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"dependencies": {
"@formkit/auto-animate": "^0.8.1",
"@formkit/nuxt": "^1.5.9",
"@nuxt/image": "^1.3.0",
"@pinia-plugin-persistedstate/nuxt": "^1.2.0",
"@pinia/nuxt": "^0.5.1",
"nuxt": "^3.10.3",
"nuxt-permissions": "^0.2.4",
"vue": "^3.4.19",
"vue-router": "^4.3.0"
},
"devDependencies": {
"@nuxt/fonts": "^0.0.1",
"@nuxtjs/html-validator": "^1.6.0",
"nuxt-icon": "^0.6.8",
"sass": "^1.71.1"
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.