50 lines
881 B
JavaScript
50 lines
881 B
JavaScript
|
|
|
||
|
|
|
||
|
|
import renderCollection from '/unify/renderCollection.js';
|
||
|
|
|
||
|
|
import groups from '/user/group/user.group.permission.js';
|
||
|
|
|
||
|
|
import gridViewBody from '/elements/gridView/gridView.body.js';
|
||
|
|
|
||
|
|
import OR from '/unify/sql/OR.js';
|
||
|
|
|
||
|
|
import AND from '/unify/sql/AND.js';
|
||
|
|
|
||
|
|
import LIKE from '/unify/sql/LIKE.js';
|
||
|
|
|
||
|
|
|
||
|
|
export default class userListTableBody extends renderCollection, gridViewBody {
|
||
|
|
|
||
|
|
debug = true;
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
async create() {
|
||
|
|
|
||
|
|
await this.sync();
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
preprocess( object ) {
|
||
|
|
|
||
|
|
var filter = object.getFilter();
|
||
|
|
|
||
|
|
filter.search = LIKE( filter.username, this.value );
|
||
|
|
|
||
|
|
//filter.search = OR( LIKE( filter.title, this.value ), LIKE( filter.body, this.value ) );
|
||
|
|
|
||
|
|
filter.direction = "desc";
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
permission() {
|
||
|
|
|
||
|
|
this.allow( groups.visitor, "READ" );
|
||
|
|
|
||
|
|
this.allow( groups.member, "READ" );
|
||
|
|
|
||
|
|
this.allow( groups.admin, "READ" );
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|