mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
Permissions authorization middleware.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import bcrypt from 'bcryptjs';
|
||||
import bookshelf from './bookshelf';
|
||||
import PermissionsService from '@/services/PermissionsService';
|
||||
|
||||
const User = bookshelf.Model.extend({
|
||||
...PermissionsService,
|
||||
|
||||
/**
|
||||
* Table name
|
||||
@@ -13,6 +15,10 @@ const User = bookshelf.Model.extend({
|
||||
*/
|
||||
hasTimestamps: ['created_at', 'updated_at'],
|
||||
|
||||
initialize() {
|
||||
this.initializeCache();
|
||||
},
|
||||
|
||||
/**
|
||||
* Verify the password of the user.
|
||||
* @param {String} password - The given password.
|
||||
|
||||
Reference in New Issue
Block a user