@@ -631,8 +631,16 @@ public class BootstrapBean implements BootstrapBeanLocal {
"ALTER TABLE users DROP COLUMN postal_town;"
});
}
dbUpdates.add(newString[]{
"CREATE TABLE event_features (id SERIAL NOT NULL, created TIMESTAMPTZ, feature TEXT NOT NULL, meta jsonb, event_id SERIAL NOT NULL, PRIMARY KEY (id))",
"CREATE TABLE event_role_features (id SERIAL NOT NULL, admin_permission BOOLEAN NOT NULL, created TIMESTAMPTZ, feature TEXT NOT NULL, info_permission BOOLEAN NOT NULL, meta jsonb, user_permission BOOLEAN NOT NULL, role_id SERIAL NOT NULL, PRIMARY KEY (id))",
.argument(newArgument().name("id").defaultValue(null).type(GraphQLInt).description("Id of the global user object. If id is 0, currently logged in user is used"))
.type(builder.typeFor(EventUser.class))
.dataFetcher(environment->{
Integerid=environment.getArgument("userId");
EventUseruser;
if(id==null||id.equals(0)){
user=permbean.getCurrentUser();
}else{
user=userbean.findByUserId(id,false);
}
if(user==null){
thrownewNullPointerException("User not found with id "+id);
}
returnuser;
}).build();
.name("user")
.argument(newArgument().name("id").defaultValue(null).type(GraphQLInt).description("Id of the global user object. If id is 0, currently logged in user is used"))
.type(builder.typeFor(EventUser.class))
.dataFetcher(environment->{
Integerid=environment.getArgument("userId");
EventUseruser;
if(id==null||id.equals(0)){
user=permbean.getCurrentUser();
}else{
user=userbean.findByUserId(id,false);
}
if(user==null){
thrownewNullPointerException("User not found with id "+id);
.description("Search users. Using this method requires admin acccess to the database")
//.argument(newArgument().name("reason").type(GraphQLString).description("Reason for the data request. Reason and requested fields are stored to audit log."))
.argument(newArgument().name("roles").defaultValue(Collections.emptyList()).description("(Optional) Filter users that belong to a role").type(GraphQLList.list(GraphQLInt)))
.argument(newArgument().name("search").type(GraphQLString).defaultValue("").description("(Optional) Filter users that contain the search parameter in their firstname, lastname, nick or email").type(GraphQLString))
.argument(newArgument().name("page").type(GraphQLInt).defaultValue(0).description("Pagination page ( 0 is the first page)"))
.description("Search users. Using this method requires admin acccess to the database")
//.argument(newArgument().name("reason").type(GraphQLString).description("Reason for the data request. Reason and requested fields are stored to audit log."))
.argument(newArgument().name("roles").defaultValue(Collections.emptyList()).description("(Optional) Filter users that belong to a role").type(GraphQLList.list(GraphQLInt)))
.argument(newArgument().name("search").type(GraphQLString).defaultValue("").description("(Optional) Filter users that contain the search parameter in their firstname, lastname, nick or email").type(GraphQLString))
.argument(newArgument().name("page").type(GraphQLInt).defaultValue(0).description("Pagination page ( 0 is the first page)"))