Features: - Full RBAC with 3 roles (superadmin/manager/contributor) - Ownership tracking on posts, tasks, campaigns, projects - Task system: assign to anyone, filter combobox, visibility scoping - Team members merged into users table (single source of truth) - Post thumbnails on kanban cards from attachments - Publication link validation before publishing - Interactive onboarding tutorial with Settings restart - Full Arabic/English i18n with RTL layout support - Language toggle in sidebar, IBM Plex Sans Arabic font - Brand-based visibility filtering for non-superadmins - Manager can only create contributors - Profile completion flow for new users - Cookie-based sessions (express-session + SQLite)
44 lines
853 B
JavaScript
44 lines
853 B
JavaScript
/*!
|
|
* express
|
|
* Copyright(c) 2009-2013 TJ Holowaychuk
|
|
* Copyright(c) 2013 Roman Shtylman
|
|
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
* MIT Licensed
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
/**
|
|
* Module dependencies.
|
|
* @private
|
|
*/
|
|
|
|
var setPrototypeOf = require('setprototypeof')
|
|
|
|
/**
|
|
* Initialization middleware, exposing the
|
|
* request and response to each other, as well
|
|
* as defaulting the X-Powered-By header field.
|
|
*
|
|
* @param {Function} app
|
|
* @return {Function}
|
|
* @api private
|
|
*/
|
|
|
|
exports.init = function(app){
|
|
return function expressInit(req, res, next){
|
|
if (app.enabled('x-powered-by')) res.setHeader('X-Powered-By', 'Express');
|
|
req.res = res;
|
|
res.req = req;
|
|
req.next = next;
|
|
|
|
setPrototypeOf(req, app.request)
|
|
setPrototypeOf(res, app.response)
|
|
|
|
res.locals = res.locals || Object.create(null);
|
|
|
|
next();
|
|
};
|
|
};
|
|
|