Hello! I need to disable user ability to add or change existing dataSource. And ability to add new relation
How can i do that?
How to disable adding/editing dataSource
-
- Posts: 5
- Joined: Wed Jun 08, 2022 6:02 am
-
- Posts: 6266
- Joined: Tue Mar 20, 2018 5:34 am
Re: How to disable adding/editing dataSource
Hello,
You can add Permissions for the Dictionary:
https://www.stimulsoft.com/en/documenta ... ttings.htm
Thank you.
You can add Permissions for the Dictionary:
https://www.stimulsoft.com/en/documenta ... ttings.htm
Thank you.
-
- Posts: 5
- Joined: Wed Jun 08, 2022 6:02 am
Re: How to disable adding/editing dataSource
Thanks for reply!
I've added lines:
options.dictionary.dataSourcesPermissions = Stimulsoft.Designer.StiDesignerPermissions.View;
options.dictionary.dataRelationsPermissions = Stimulsoft.Designer.StiDesignerPermissions.View;
options.dictionary.showAdaptersInNewConnectionForm = false;
options.dictionary.dataConnectionsPermissions = Stimulsoft.Designer.StiDesignerPermissions.View;
and now user cannot add connections or dataSources...but! usr still can add new dictionary! where creating new dataSource is available again
is it possible to prevent this?
I've added lines:
options.dictionary.dataSourcesPermissions = Stimulsoft.Designer.StiDesignerPermissions.View;
options.dictionary.dataRelationsPermissions = Stimulsoft.Designer.StiDesignerPermissions.View;
options.dictionary.showAdaptersInNewConnectionForm = false;
options.dictionary.dataConnectionsPermissions = Stimulsoft.Designer.StiDesignerPermissions.View;
and now user cannot add connections or dataSources...but! usr still can add new dictionary! where creating new dataSource is available again
is it possible to prevent this?
-
- Posts: 6266
- Joined: Tue Mar 20, 2018 5:34 am
Re: How to disable adding/editing dataSource
Hello,
Please check the following code:
Thank you.
Please check the following code:
Code: Select all
var designer = new Stimulsoft.Designer.StiDesigner(options, "StiDesigner", false);
designer.renderHtml("content");
var dictionaryPanel = designer.jsObject.options.dictionaryPanel;
dictionaryPanel.toolBar.controls["Actions"].style.display = "none";
dictionaryPanel.toolBar.controls["NewItem"].style.display = "none";
//if you want to hide context menu for dictionary panel
dictionaryPanel.onmouseup = function (event) {
return false;
}
-
- Posts: 5
- Joined: Wed Jun 08, 2022 6:02 am
Re: How to disable adding/editing dataSource
yes, thank you! this works!
-
- Posts: 6266
- Joined: Tue Mar 20, 2018 5:34 am
Re: How to disable adding/editing dataSource
Hello,
You are welcome.
You are welcome.