Files
nginx-proxy-manager/backend/models/user_permission.js
T
Abdulhafiz Davlatov bc8bbf3562 feat: rate limit auth endpoints and scope user proxy host permissions
- 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
2026-11-05 12:16:36 +05:00

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;