Only auto-login the owner for subscription setup
This commit is contained in:
@@ -2236,12 +2236,13 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
Client.prototype.openSubscriptionSetup = function (subscription) {
|
||||
var that = this;
|
||||
|
||||
this.getAppstoreUserToken(function (error, result) {
|
||||
if (error) return console.error('Unable to get appstore user token.', error);
|
||||
var email = subscription.emailEncoded;
|
||||
var cloudronId = subscription.cloudronId;
|
||||
|
||||
var token = result;
|
||||
var email = subscription.emailEncoded;
|
||||
var cloudronId = subscription.cloudronId;
|
||||
if (!this._userInfo.isAtLeastOwner) return window.location.href = that.getConfig().webServerOrigin + '/console.html#/userprofile?view=subscriptions&email=' + email + '&cloudronId=' + cloudronId;
|
||||
|
||||
this.getAppstoreUserToken(function (error, token) {
|
||||
if (error) console.error('Unable to get appstore user token.', error);
|
||||
|
||||
window.location.href = that.getConfig().webServerOrigin + '/console.html#/userprofile?view=subscriptions&email=' + email + '&cloudronId=' + cloudronId + '&token=' + token;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user