Using feathers-casl
with feathers-pinia
and feathers Dove
- [How to define CASL rules]
- [Feathers-CASL Dove release v1.0.1]
- [Feathers-CASL Feathers-vuex documentation] (most of this comes from here)
casl @casl/ability@5 feathers-casl@pre
import { Ref, ComputedRef } from 'vue' | |
interface ICommentFindOptions { | |
increment: number, | |
initialSize?: number | |
} | |
interface ICommentFindResult { | |
data: ComputedRef<Comment[]> | |
hasMoreComments: ComputedRef<boolean> |
routeConfig.post('/Dashboard/Index', repos.DashboardRepository.getRangeData(repos), (req, res) => { | |
let queries = [], | |
sess = req.userSession, | |
filter = req.rangeFilter; | |
queries.push(repos.PromotionRepository.getAgencyPromotions(sess.agencyId, 'all')); | |
queries.push(repos.DashboardRepository.getIndex(repos, filter, sess)); | |
queries.push(repos.PolicyRepository.getPolicies(filter, true)); | |
Promise.all(queries) |
/* this is the first route hit */ | |
routeConfig.all('/*', (req, res, next) => { | |
req.sessionStore.get(req.session.id, (err, sess) => { | |
/* sess.user is set on login */ | |
if (sess && sess.user) { | |
/* logged in */ | |
} else { | |
/* not logged in */ | |
} |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |