diff --git a/app/views/account/profile_view.coffee b/app/views/account/profile_view.coffee index e1d4ba520..ccec22977 100644 --- a/app/views/account/profile_view.coffee +++ b/app/views/account/profile_view.coffee @@ -70,7 +70,7 @@ module.exports = class ProfileView extends View context.allowedToEditJobProfile = @user and (me.isAdmin() or (context.myProfile && !me.get('anonymous'))) context.profileApproved = @user?.get 'jobProfileApproved' context.progress = @progress ? @updateProgress() - @editing ?= context.progress < 0.8 + @editing ?= context.myProfile and context.progress < 0.8 context.editing = @editing context.marked = marked context.moment = moment diff --git a/server/users/user_handler.coffee b/server/users/user_handler.coffee index 89522208b..508578785 100644 --- a/server/users/user_handler.coffee +++ b/server/users/user_handler.coffee @@ -150,7 +150,7 @@ UserHandler = class UserHandler extends Handler return @sendDatabaseError(res, err) if err res.send JSON.stringify(count + 1) - getSimulatorLeaderboardQueryParameters: (req) -> + getSimulatorLeaderboardQueryParameters: (req) -> @validateSimulateLeaderboardRequestParameters(req) query = {} diff --git a/server_setup.coffee b/server_setup.coffee index d214497cb..0cf6b6cc3 100644 --- a/server_setup.coffee +++ b/server_setup.coffee @@ -48,7 +48,7 @@ setupPassportMiddleware = (app) -> app.use(authentication.initialize()) app.use(authentication.session()) -setupOneSecondDelayMiddlware = (app) -> +setupOneSecondDelayMiddleware = (app) -> if(config.slow_down) app.use((req, res, next) -> setTimeout((-> next()), 1000)) @@ -74,7 +74,7 @@ exports.setupMiddleware = (app) -> setupMiddlewareToSendOldBrowserWarningWhenPlayersViewLevelDirectly app setupExpressMiddleware app setupPassportMiddleware app - setupOneSecondDelayMiddlware app + setupOneSecondDelayMiddleware app ###Routing function implementations###