This is a staff-only API created primarily to support the
getKeys() functionality used in the browser client for
server-managed settings.
+
+ Note as of now, this API can return names for user settings
+ which are unrelated to the staff client. ALL user setting
+ names matching the selected prefix are returned!
+
+ Use the workstation_only option to avoid returning any user
+ setting names.
+
/,
params => [
{desc => 'authtoken', type => 'string'},
);
sub applied_settings {
- my ($self, $client, $auth, $prefix) = @_;
+ my ($self, $client, $auth, $prefix, $options) = @_;
my $e = new_editor(authtoken => $auth);
return $e->event unless $e->checkauth;
return $e->event unless $e->allowed('STAFF_LOGIN');
+ $options ||= {};
+
my $query = {
select => {awss => ['name']},
from => 'awss',
$client->respond($key->{name});
}
+ return undef if $options->{workstation_only};
+
$query = {
select => {aus => ['name']},
from => 'aus',
<ul class="nav nav-tabs">
<li ng-class="{active : context == 'local'}">
- <a href='' ng-click="setContext('local')">[% l('Local Prefs') %]</a>
+ <a href='' ng-click="setContext('local')">[% l('In-Browser Prefs') %]</a>
</li>
<li ng-class="{active : context == 'remote'}">
- <a href='' ng-click="setContext('remote')">[% l('Remote Prefs') %]</a>
+ <a href='' ng-click="setContext('remote')">[% l('Hatch Prefs') %]</a>
+ </li>
+ <li ng-class="{active : context == 'server_workstation'}">
+ <a href='' ng-click="setContext('server_workstation')">[% l('Server Workstation Prefs') %]</a>
</li>
</ul>
<div class="tab-content">
// fetch the keys
function refreshKeys() {
- $scope.keys = {local : [], remote : []};
+ $scope.keys = {local : [], remote : [], server_workstation: []};
if (egCore.hatch.hatchAvailable) {
egCore.hatch.getRemoteKeys().then(
// local calls are non-async
$scope.keys.local = egCore.hatch.getLocalKeys();
+
+ egCore.hatch.getServerKeys(null, {workstation_only: true}).then(
+ function(keys) {$scope.keys.server_workstation = keys});
}
refreshKeys();
if ($scope.context == 'local') {
$scope.currentKeyContent = egCore.hatch.getLocalItem(key);
- } else {
+ } else if ($scope.context == 'remote') {
egCore.hatch.getRemoteItem(key)
.then(function(content) {
$scope.currentKeyContent = content
});
+ } else if ($scope.context == 'server_workstation') {
+ egCore.hatch.getServerItem(key).then(function(content) {
+ $scope.currentKeyContent = content;
+ });
}
}
if ($scope.context == 'local') {
egCore.hatch.removeLocalItem(key);
refreshKeys();
- } else {
+ } else if ($scope.context == 'remote') {
// Honor requests to remove items from Hatch even
// when Hatch is configured for data storage.
egCore.hatch.removeRemoteItem(key)
.then(function() { refreshKeys() });
+ } else if ($scope.context == 'server_workstation') {
+ egCore.hatch.removeServerItem(key)
+ .then(function() { refreshKeys() });
}
},
cancel : function() {} // user canceled, nothing to do
return $q.when(service.getLocalKeys(prefix));
}
- service.getServerKeys = function(prefix) {
+ service.getServerKeys = function(prefix, options) {
if (!service.auth) service.auth = $injector.get('egAuth');
if (!service.auth.token()) return $q.when({});
return egNet.request(
'open-ils.actor',
'open-ils.actor.settings.staff.applied.names.authoritative.atomic',
- service.auth.token(), prefix
+ service.auth.token(), prefix, options
);
}
A setting is read-only when an org unit setting type exists (regardless of
whether a value is applied) and no user or workstation setting type exists.
+Server-Stored Workstation Settings Workstation Admin View
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+There's a new "Server Workstation Prefs" tab to the stored preferences
+workstation admin interface. From here, users can view which
+preferences are stored as server-stored workstation preferences and
+delete select values.
+
Upgrade Notes
+++++++++++++