Skip to content

Commit 8886994

Browse files
noahsilasTylerBrock
authored andcommitted
Remove overridden getUserRoles method
In c7b550e There was a new `getUserRoles` method added, but the old version was left in place too, overriding the new method. Oops! Let's clear that old way out to make room for the new.
1 parent f4709f9 commit 8886994

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

src/Auth.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ var getAuthForLegacySessionToken = function({
169169
});
170170
};
171171

172+
// Returns a promise that resolves to an array of role names
172173
Auth.prototype.getUserRoles = function () {
173174
if (this.isMaster || !this.user) {
174175
return Promise.resolve([]);
@@ -293,21 +294,6 @@ Auth.prototype._generateRoleGraphPipeline = function () {
293294
];
294295
};
295296

296-
// Returns a promise that resolves to an array of role names
297-
Auth.prototype.getUserRoles = function() {
298-
if (this.isMaster || !this.user) {
299-
return Promise.resolve([]);
300-
}
301-
if (this.fetchedRoles) {
302-
return Promise.resolve(this.userRoles);
303-
}
304-
if (this.rolePromise) {
305-
return this.rolePromise;
306-
}
307-
this.rolePromise = this._loadRoles();
308-
return this.rolePromise;
309-
};
310-
311297
Auth.prototype.getRolesForUser = async function() {
312298
//Stack all Parse.Role
313299
const results = [];

0 commit comments

Comments
 (0)