Compare commits

..

3 Commits

3 changed files with 4 additions and 2 deletions

View File

@ -72,7 +72,7 @@ def get(user, include):
def get_one(user, id): def get_one(user, id):
id = ObjectId(id) id = ObjectId(id)
db = database.get_db() db = database.get_db()
idp = db.idps.find_one(query) idp = db.idps.find_one(id)
if not idp: raise errors.NotFound('The IdP could not be found') if not idp: raise errors.NotFound('The IdP could not be found')
if not can_manage_idp(user, idp): raise errors.Forbidden('You can\'t view this IdP') if not can_manage_idp(user, idp): raise errors.Forbidden('You can\'t view this IdP')
idp['users'] = list(db.idpUsers.find({'idp': idp['_id']}, {'firstName': 1, 'lastName': 1, 'email': 1})) idp['users'] = list(db.idpUsers.find({'idp': idp['_id']}, {'firstName': 1, 'lastName': 1, 'email': 1}))

View File

@ -232,7 +232,7 @@ export default {
this.$store.commit('login', true); this.$store.commit('login', true);
localStorage.setItem('apiToken', token); localStorage.setItem('apiToken', token);
api.token = token; api.token = token;
api.req('GET', '/users/me', null, u => this.$store.commit('setUser', u)); api.req('GET', '/users/me', null, u => this.$store.commit('setUser', u), () => this.logout());
this.$router.push('/dashboard'); this.$router.push('/dashboard');
}, },
login() { login() {

View File

@ -56,6 +56,8 @@
</v-list-tile> </v-list-tile>
</v-list> </v-list>
</v-card> </v-card>
<v-btn block color='secondary' style="margin-top: 15px;" :href="`https://idp.sso.tools/${idp.code}`" target="_blank"><v-icon>open_in_new</v-icon> Open IdP dashboard</v-btn>
</v-flex> </v-flex>
<v-flex md8> <v-flex md8>