DDX Form and Dataset - Allow users to edit or remove entries
I have a DDX Brick setup to allow users to input items into a form that I then use in an ETL to filter our specific rows. By default, the DDX form is set to only allow the owner (myself) to edit or remove entries. I would like to set this up to allow anyone with access this ability. I was able to successfully modify the javascript to have the add/remove buttons to show up for all users, not just the owner, however other users are not actually able to successfully remove/edit anything.
Does anyone know if this is actually possible or does this have to do with Domo user permissions preventing changes being made?
Answers
-
This is likely the issue of underlying Domo permissions as users would need to have dataset edit privileges to make changes to the dataset.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
AppDB and Datasets are separate things and the permissions are also handled separately. We have an upcoming feature to make it easier to deal with permissions on AppDB but you currently can make changes using endpoints detailed here - https://developer.domo.com/docs/dev-studio-references/appdb#Collection%20Level%20Security
0 -
I also forgot about the wiring screen. When you edit the card you can set the access granted by the app instance. It should default to what you need already, then you just need to share the card with the users you want to have access.
0 -
I've tried various combinations of app permissions. Currently, I have all permissions set. Users are able to see and click the Delete button which does remove it from the current window however once refreshed or any other change is made, the deleted rows re-appear. I've also tried using the endpoints from that same page with no luck.
This is my "remove" function at the moment. My javascript experience is quite rusty so it's very likely I'm doing something wrong here but I've tried various different ways of writing this function with various diffent permissions set without any success.
function remove(documentId){ const test = location.href.substring(8,44); domo.delete(`/domo/datastores/v1/collections/Users/permission/RYUU_APP/${test}?permissions=admin`); return domo.delete(`/domo/datastores/v1/collections/${collectionName}/documents/${documentId}`).then(res => { var index = cache.findIndex(doc => doc.id === documentId); cache.splice(index, 1); });
0 -
@TylerMarshall I had the same issue and commented out all these sections of code which now allows all my users to use the brick. This DDX brick is especially useful because I can have my basic users (no card or dataset access) to edit it.
JavaScript
CSS
**If this answer solved your problem be sure to like it and accept it as a solution!
1 -
@Ashleigh I tried this and while this does enable the buttons for the other users, they still are not able to edit/delete rows even on a fresh instance of the DDX Form. I had a similar solution in place however I just switched the return from the 'isViewTheOwner' function to be 'return 1===1' so that all users would be set as the owner.
function isViewerTheOwner() { return Promise.all([ collectionService.getCollectionInfo(), domo.get('/domo/environment/v1'), ]).then(function([info, env]){ return 1 === 1; }); }
Were there any other changes you made?
0 -
@TylerMarshall hmm that is weird, my users are able to with those changes. Do they see the pencil icon?
**If this answer solved your problem be sure to like it and accept it as a solution!
0 -
@Ashleigh Yes, they see all the same icons I am able to see. When they click the trashcan, the line will disappear however as soon as the page refreshes, it will return as no real change was made to the data. When they try to edit lines, the app freezes when they click save
0 -
@TylerMarshall what do you have this line as? It is default to False, you have to make it True if you want changes synced to the dataset.
**If this answer solved your problem be sure to like it and accept it as a solution!
0 -
@Ashleigh That is set to true.
0 -
@TylerMarshall I would put a ticket in, seems like maybe there is a different issue. Only other thing you could check if roles/access to the data.
**If this answer solved your problem be sure to like it and accept it as a solution!
0 -
Tyler on your example code you are running a domo.delete to set a permission? That should be a PUT to set a permission. I also see "Users" in your call. In the code example in the documentation that would be the collection name for the example but this may be different than what yours is. You also don't need to set the permission every time you want to delete the document.
Most likely all you need to do is make sure that collection in the wiring screen (when you edit the app card) has the delete content permission set and then the card is shared to the user that is doing deletes.
The buttons are front end don't necessarily mean the user has the access on the collection to make the changes. If you monitor the network calls when you make these actions it will show you if it's being blocked due to rights or not. That may shed more light on what is actually happening.
Lastly, this DDX Brick will not work in a public embed context as we block all AppDB access like this for public embed. You would just want to do a normal custom app and not DDX if you are wanting embed.
0 -
I just did some more research into this and it looks like that specific DDX Brick has additional required authorities (aka grants) that more locked down users may not have. I am contacting the team that made the DDX Brick to have them update the documentation on what authorities are required for it.
0 -
Looks like the Manage DataSet grant is currently needed for a user to be able to edit the collection used by this app.
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive