Skip to content

Commit 5166a38

Browse files
committed
Use currentUser.login; the id is the database id
The "manage owners" link wasn't showing up for me even when I was an owner because it couldn't match up logins and database ids :)
1 parent 69d4405 commit 5166a38

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/controllers/crate/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default Controller.extend({
2727
categories: computed.alias('crate.categories'),
2828
badges: computed.alias('crate.badges'),
2929
isOwner: computed('crate.owner_user', function() {
30-
return this.get('crate.owner_user').findBy('login', this.session.get('currentUser.id'));
30+
return this.get('crate.owner_user').findBy('login', this.session.get('currentUser.login'));
3131
}),
3232

3333
sortedVersions: computed.readOnly('crate.versions'),

tests/acceptance/crate-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ test('navigating to the owners page when not an owner', async function(assert) {
142142

143143
this.application.register('service:session-b', Ember.Service.extend({
144144
currentUser: {
145-
id: 'iain8'
145+
login: 'iain8'
146146
}
147147
}));
148148

@@ -158,7 +158,7 @@ test('navigating to the owners page', async function(assert) {
158158

159159
this.application.register('service:session-b', Ember.Service.extend({
160160
currentUser: {
161-
id: 'thehydroimpulse'
161+
login: 'thehydroimpulse'
162162
}
163163
}));
164164

0 commit comments

Comments
 (0)