Question

I have started working with server side app settings and it would appear the default mechanics for a shared app is to save the app settings across the entire project scope; so if an individual makes changes to the app settings, those changes are reflected for all future users. This is not the ideal use in my specific case. I would like it if I could have different settings for each user, without them each adding separate instances of my custom HTML. Is this possible using server side settings, or will I need to look into using cookies to save the settings on each user?

Note: I've read the documentation on app setting scope (https://help.rallydev.com/apps/2.0rc1/doc/#!/guide/settings-section-define-scope) but it doesn't appear as though "user" is an option.

Thanks!

Was it helpful?

Solution 2

I have solved this issue by prepending the user ObjectID to each setting value before I save or load it from the Rally servers. Here is the code for my user settings set/get functions:

setUserSetting : function(settingName, settingValue, callback) {
    var settings = {};
    settings[App.getContext().getUser().ObjectID + settingName] = settingValue;
    App.updateSettingsValues({
        settings : settings,
        success  : function() {
            App.setSettings(Ext.Object.merge(App.getSettings(), settings));
            callback();
        }
    });
},

getUserSetting : function(settingName) {
    return App.getSetting(App.getContext().getUser().ObjectID + settingName);
}

BTW, it seems kind of strange that I have to save the settings in the way I have. The "updateSettingsValues" function sets the settings on the next load of the app and the "setSettings" function sets it for the current runtime of the app. It's a strange way to have to do it, but it works.

OTHER TIPS

Conner, you're making a good argument for User-level settings for an app. Unfortunately, we don't support that currently. The settingsScope option in AppSettings only supports the values app, project, or workspace.

Creating an instance of the app for each user (such as on their individual dashboard) is the best alternative I can think of. But as you mentioned, this is not ideal for you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top