popupMenu: Hide settings menus outside user session

The control-center contains user-pertinent settings
panels. These panels don't make sense to show outside
of a user's session, so hide them for session types other
than SessionType.USER.

https://bugzilla.gnome.org/show_bug.cgi?id=657082
This commit is contained in:
Ray Strode
2011-08-28 22:15:53 -04:00
parent 35e99266ba
commit 239a9e4816
2 changed files with 11 additions and 6 deletions

View File

@ -813,6 +813,10 @@ PopupMenuBase.prototype = {
},
addSettingsAction: function(title, desktopFile) {
// Don't allow user settings to get edited unless we're in a user session
if (global.session_type != Shell.SessionType.USER)
return null;
let menuItem = this.addAction(title, function() {
let app = Shell.AppSystem.get_default().lookup_setting(desktopFile);