Data Source management permission can't enable datasources
-
Hi there!
Is there a way to give users permission to enable/disable datasources without being a super-admin?I put a new user group called "ds-mngt" in the "Data Source Management Permissions"(System settings), afterwards users can access and create DS in the DS page. However, when those users try to enable/disable any DS(which they have edit permissions or even the ones they create themselves), an error message says: "Method toggle requires admin access"
Thanks in advance
-
Hi Ava, welcome to the forum!
In 3.5.6 there is not a way to allow a non-admin user to toggle a data source from that page. If one wished to give a non-admin user the ability to turn a data source off, one would have to do so via a script with a binary point in its context.
Then when the point changes, the script,
if(enabled.value === true) { //Do we need to restart, or just ensure it's running? RuntimeManager.enableDataSource("DS_XID"); } else { RuntimeManager.disableDataSource("DS_XID"); }
And then the ability to enable or disable the data source is a function of the permissions to set the binary point (in context as
enabled
)In 3.6 this has been changed to function as you had intuited. Originally I believe an argument was made that a lesser user should not readily be able to stop the acquisition of data but was rather expected to be making adjustments to data point settings and whatnot, but I don't think that was clear or really necessary to limit this way. But, I could recall incorrectly; it could be a bug.
-
Hi Phil, I just updated my testing instance to 3.6 now, but I didn't see the function working as you mentioned.
Was it deployed?Andre
-
Hi Ava,
What are you seeing?
If you go into the Administration --> Edit menu to make sure that the data source menu icon (under administration) is visible to the user with data source management permissions. At that point they should be able to click on the Data Sources item in the menu to get to the new data sources page, where they could toggle data sources either by setting them enabled in the editor or using the toggle switch (you may need to fullscreen your browser to see the toggle switches). I just tested this on 3.6.0 and was able to toggle any data source with a user who only had data source management permission.
In 3.6 any user can navigate via URL to /ui/administration/data-sources but only users with admin or data source management permissions can create new sources. A user with no permissions saved on their users page still possesses the role of 'user' so they would be able to toggle / edit data sources with an edit permission of 'user'
-
Oh yes, now I see that the problem happens only in the legacy UI, in the new datasource page UI, the feature is working properly!