Bug 894349 - Sort permissions in the site identity panel and the page info window alphabetically. r=jaws

This commit is contained in:
Dão Gottwald 2013-07-16 22:12:48 +02:00
parent 7b9085b453
commit f2fc4df65e

View File

@ -27,7 +27,11 @@ this.SitePermissions = {
/* Returns an array of all permission IDs.
*/
listPermissions: function () {
return Object.keys(gPermissionObject);
let array = Object.keys(gPermissionObject);
array.sort((a, b) => {
return this.getPermissionLabel(a).localeCompare(this.getPermissionLabel(b));
});
return array;
},
/* Returns an array of permission states to be exposed to the user for a