Skip to content

Commit 4c02292

Browse files
committed
Fixed URL issues, and more authentication removal.
1 parent f4ac057 commit 4c02292

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

coder-apps/common/coder/views/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@
7575
</div>
7676
<div id="settingscontainer" class="sidepanel">
7777
<h1>Settings</h1>
78+
<!--
7879
<div class="logout">Log Out</div>
80+
-->
7981
<div class="formfield">
8082
<div class="label">Your Coder's Name</div>
8183
<input type="text" id="coder_name" />
@@ -112,9 +114,11 @@ <h1>Settings</h1>
112114
<div class="colorchit" style="background-color:#3e3e3e;"></div>
113115
<div style="clear:both"></div>
114116
</div>
117+
<!--
115118
<div class="formfield setupbuttons">
116119
<div class="changepass">Change Password</div>
117120
</div>
121+
-->
118122
<div class="save">Save</div>
119123
<div class="cancel">Cancel</div>
120124
</div>

coder-apps/common/coderlib/app/app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,11 @@ exports.listApps = function() {
6969
var path = process.cwd(); //root application path. different from __dirname
7070
var appdir = path + "/apps/";
7171
var apps = {};
72+
console.log ("reading apps from: " + appdir);
7273
var files = fs.readdirSync(appdir);
7374
for ( var x in files ) {
7475
var filename = files[x];
76+
console.log ('Processing: ' + filename);
7577
var info = fs.statSync( appdir + filename );
7678
if ( info.isDirectory() ) {
7779
var appinfo = null;

coder-base/localserver.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,17 @@ var apphandler = function( req, res, appdir ) {
6565

6666
auth = require(appdir + "localauth" + "/app");
6767

68-
/* Disabling authentication requirement.
68+
/* Disabling authentication requirement. */
6969
//Redirect to sign-in for unauthenticated users
70-
publicAllowed = ["auth"]; //apps that are exempt from any login (should only be auth)
71-
auth = require(appdir + "auth" + "/app");
72-
user = auth.isAuthenticated(req, res);
73-
if ( !user && publicAllowed.indexOf( appname ) < 0) {
74-
util.log("redirect: " + "http://" + getHost(req) + ":" + config.httpVisiblePort + '/app/auth');
75-
res.redirect("http://" + getHost(req) + ":" + config.httpVisiblePort + '/app/auth' );
76-
return;
77-
}
78-
*/
70+
// publicAllowed = ["auth"]; //apps that are exempt from any login (should only be auth)
71+
// auth = require(appdir + "auth" + "/app");
72+
// user = auth.isAuthenticated(req, res);
73+
// if ( !user && publicAllowed.indexOf( appname ) < 0) {
74+
// util.log("redirect: " + "http://" + getHost(req) + ":" + config.httpVisiblePort + '/app/auth');
75+
// res.redirect("http://" + getHost(req) + ":" + config.httpVisiblePort + '/app/auth' );
76+
// return;
77+
// }
78+
7979

8080
if ( !apppath ) {
8181
apppath = "/";
@@ -164,7 +164,7 @@ localapp.use( express.session({
164164
localapp.use( '/static', express.static( __dirname + '/static' ) );
165165
localapp.get( '/', function( req, res ) {
166166
util.log( 'GET: /' );
167-
res.redirect( '/app/auth' );
167+
res.redirect( '/app/localauth' );
168168
});
169169
localapp.all( /^\/app\/(\w+)\/(.*)$/, function( req, res ) { apphandler( req, res, __dirname + '/apps/'); } );
170170
localapp.all( /^\/app\/(\w+)\/$/, function( req, res ) { apphandler( req, res, __dirname + '/apps/'); } );

0 commit comments

Comments
 (0)