Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Nest admin list in security object and add comments to local.json

  • Loading branch information...
commit 9cd1eb3e4ba7d36467bb06cabb74bfa69f2a2eec 1 parent f6212e6
@kriszyp kriszyp authored
Showing with 19 additions and 9 deletions.
  1. +2 −2 lib/access.js
  2. +17 −7 local.json
View
4 lib/access.js
@@ -3,14 +3,14 @@
*/
var pageFacets = require("facet/page"),
pageChangeFacets = require("facet/page-change"),
- admins = require("commonjs-utils/settings").admins,
+ admins = require("commonjs-utils/settings").security.admins,
Register = require("pintura/security").Register,
FullAccess = require("pintura/security").FullAccess,
security = require("pintura/pintura").config.security;
security.getAllowedFacets = function(user, request){
if(user){
- if(admins.indexOf(user.username)>-1){
+ if(admins.indexOf(user)>-1){
return [FullAccess];
}
return [pageFacets.UserFacet, pageChangeFacets.PublicFacet];
View
24 local.json
@@ -1,20 +1,30 @@
{
- "//processes": "For production, you would normally want the number of processes to match the number of cores, but for debugging, using 1 is much easier:",
+ "//": "For production, you would normally want the number of processes to match the number of cores, but for debugging, using 1 is much easier:",
"processes": 1,
- "//port": "This is the HTTP port to listen on:",
+ "//": "This is the HTTP port to listen on:",
"port": 8080,
+ "//": "Indicates whether the console should run",
+ "repl": true,
+ "//": "Indicates a TCP/port connection for the console (omit to disable)",
+ "replPort": 5555,
+ "//": "Database settings",
"database": {
- "connection":"jdbc:mysql://localhost/wiki?user=root&password=&useUnicode=true&characterEncoding=utf-8&autoReconnect=true",
+ "connection":"jdbc:mysql://localhost/wiki?user=root&password=root&useUnicode=true&characterEncoding=utf-8&autoReconnect=true",
"type": "mysql",
"host": "localhost",
- "port": 27017,
- "name": "wiki"
+ "port": 8889,
+ "name": "test"
},
"mail": {
"host":"mail.site.com",
"defaultFrom": "app@site.com"
},
- "bypassSecurity": true,
- "admins":["kris"],
+ "security":{
+ "//": "Bypass security for initial setup",
+ "bypass": true,
+ "//": "List of admins",
+ "admins":["admin"],
+ },
+ "//": "Default location of data",
"dataFolder": "data"
}
Please sign in to comment.
Something went wrong with that request. Please try again.