forked from 0x2620/pandora
honor capabilities when constructing find select (no filename if not staff or admin); fix a bug where after app panel reload, a non-existing menu would still be bound to all keyboard events
This commit is contained in:
parent
f5aadf2267
commit
d378b130f0
2 changed files with 7 additions and 5 deletions
|
|
@ -26,12 +26,14 @@ pandora.ui.findElement = function() {
|
|||
pandora.$ui.findSelect = Ox.Select({
|
||||
id: 'select',
|
||||
items: Ox.merge(
|
||||
pandora.site.findKeys.map(function(key, i) {
|
||||
return {
|
||||
Ox.map(pandora.site.findKeys, function(key, i) {
|
||||
return !key.capability
|
||||
|| pandora.site.capabilities[key.capability][pandora.user.level]
|
||||
? {
|
||||
id: key.id,
|
||||
title: 'Find: ' + key.title,
|
||||
checked: findKey == key.id
|
||||
};
|
||||
} : null;
|
||||
}),
|
||||
[{}, {
|
||||
id: 'advanced',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue