mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Fixed #979
This commit is contained in:
parent
ae213cc330
commit
4221fd55cb
2 changed files with 8 additions and 3 deletions
|
@ -17,7 +17,7 @@ block content
|
|||
if user.id != me.id
|
||||
button.btn.edit-settings-button#enter-espionage-mode 007
|
||||
|
||||
if user.get('jobProfile')
|
||||
if user.get('jobProfile') && allowedToViewJobProfile
|
||||
- var profile = user.get('jobProfile');
|
||||
.job-profile-container
|
||||
.job-profile-row
|
||||
|
@ -112,7 +112,11 @@ block content
|
|||
.project-image(style="background-image: url('/file/" + project.picture + "')")
|
||||
p= project.name
|
||||
div!= marked(project.description)
|
||||
|
||||
else if allowedToViewJobProfile
|
||||
.public-profile-container
|
||||
h2 Loading...
|
||||
|
||||
|
||||
else
|
||||
.public-profile-container
|
||||
h2
|
||||
|
|
|
@ -18,7 +18,7 @@ module.exports = class ProfileView extends View
|
|||
super options
|
||||
if @userID is me.id
|
||||
@user = me
|
||||
else
|
||||
else if me.isAdmin() or "employer" in me.get('permissions')
|
||||
@user = User.getByID(@userID)
|
||||
@user.fetch()
|
||||
@listenTo @user, "sync", =>
|
||||
|
@ -27,6 +27,7 @@ module.exports = class ProfileView extends View
|
|||
getRenderData: ->
|
||||
context = super()
|
||||
context.user = @user
|
||||
context.allowedToViewJobProfile = me.isAdmin() or "employer" in me.get('permissions')
|
||||
context.myProfile = @user.id is context.me.id
|
||||
context.marked = marked
|
||||
context.moment = moment
|
||||
|
|
Loading…
Reference in a new issue