mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-11-15 19:48:04 +00:00
- Add in-memory sliding window rate limiter for auth token endpoints with CI/test bypass and successful request exclusion - Add user_permission meta column migration and Objection model configuration - Support scoping allowed proxy hosts per user when in 'Created Items Only' visibility mode - Restrict advanced nginx configuration editing on hosts to admin users only - Fix user permissions route ID parsing and omit id from permission update payloads - Add allowed proxy hosts selector in permissions modal and display permissions summary badges in users table
34 lines
541 B
JavaScript
34 lines
541 B
JavaScript
// Objection Docs:
|
|
// http://vincit.github.io/objection.js/
|
|
|
|
import { Model } from "objection";
|
|
import db from "../db.js";
|
|
import now from "./now_helper.js";
|
|
|
|
Model.knex(db());
|
|
|
|
class UserPermission extends Model {
|
|
$beforeInsert() {
|
|
this.created_on = now();
|
|
this.modified_on = now();
|
|
}
|
|
|
|
$beforeUpdate() {
|
|
this.modified_on = now();
|
|
}
|
|
|
|
static get name() {
|
|
return "UserPermission";
|
|
}
|
|
|
|
static get tableName() {
|
|
return "user_permission";
|
|
}
|
|
|
|
static get jsonAttributes() {
|
|
return ["meta"];
|
|
}
|
|
}
|
|
|
|
export default UserPermission;
|