Flesh out users OU (works with Gitea simple LDAP now!!)
This commit is contained in:
13
app/models/scopes/ActiveScope.js
Normal file
13
app/models/scopes/ActiveScope.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const { Scope } = require('flitter-orm')
|
||||
|
||||
/**
|
||||
* A flitter-orm scope that enables soft-deletion by an active key.
|
||||
* @extends {module:flitter-orm/src/model/Scope~Scope}
|
||||
*/
|
||||
class ActiveScope extends Scope {
|
||||
async filter(to_filter) {
|
||||
return to_filter.equal('active', true)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = exports = ActiveScope
|
||||
Reference in New Issue
Block a user