Merge pull request #861 from jitsi/ui-redesign-guests-profile

feat(profile): Don't allow non-guest users to edit their profile
This commit is contained in:
yanas 2016-09-13 17:38:51 -05:00 committed by GitHub
commit 406618677b
3 changed files with 10 additions and 2 deletions

View File

@ -69,5 +69,9 @@ var config = {
'During that time service will not be available. ' +
'Apologise for inconvenience.',*/
disableThirdPartyRequests: false,
minHDHeight: 540
minHDHeight: 540,
// If true - all users without token will be considered guests and all users
// with token will be considered non-guests. Only guests will be allowed to
// edit their profile.
enableUserRolesBasedOnToken: false
};

View File

@ -65,9 +65,12 @@ class TokenData{
* @param {string} the JWT token
*/
constructor(jwt) {
this.isGuest = true;
if(!jwt)
return;
this.isGuest = config.enableUserRolesBasedOnToken !== true;
this.jwt = jwt;
//External API settings

View File

@ -367,6 +367,7 @@ function registerListeners() {
UI.addListener(UIEvents.TOGGLE_CONTACT_LIST, UI.toggleContactList);
UI.addListener( UIEvents.TOGGLE_PROFILE, function() {
if(APP.tokenData.isGuest)
UI.toggleSidePanel("profile_container");
});