superset icon indicating copy to clipboard operation
superset copied to clipboard

[permissions] when a user creates a table from sql-lab, make them an owner

Open ascott opened this issue 9 years ago • 10 comments

currently, the user doesn't get added as an owner after they create a datasource via the visualize flow in sql lab.

create-datasource-from-sql-lab-flow

expected behavior is that the user be added as an owner on that new table.

ascott avatar May 22 '17 20:05 ascott

@mistercrunch could this be as easy as adding something like table.owner = g.user.get_id() here?

ascott avatar May 22 '17 20:05 ascott

@ascott - I'm so happy to see that we're launching a PR for this use case!

jfeng15 avatar May 23 '17 04:05 jfeng15

Currently there's no notion of ownership for tables. We need to add a many to many relationship between a new SqlaTable.owners and User and get rid of the unique constraint on db_id/schema/table_name and manage ownership on the ModelView update/delete events like we do for Slice and Dashboard.

mistercrunch avatar May 23 '17 04:05 mistercrunch

Related https://github.com/apache/incubator-superset/issues/911

timifasubaa avatar Feb 15 '18 00:02 timifasubaa

this is a big issue for us. we have multiple teams who can't have access to eachothers datasources, but they also have to work with sql lab because of joins. the only way to let them work is giving everyone all_datasource_access so they can create an sql datasource and slice it. this can't work in an enterprise environment.

qyoz avatar May 30 '18 10:05 qyoz

How to solve it?

qin4zhang avatar May 31 '18 10:05 qin4zhang

Here: https://github.com/apache/incubator-superset/pull/5119

mistercrunch avatar May 31 '18 23:05 mistercrunch

@mistercrunch It's not merged yet. Which version could it be released?

qin4zhang avatar Jun 01 '18 07:06 qin4zhang

If you want recent commits I suggest you make your own releases/build. It's well documented and gives you the freedom to use any base and pick your 🍒 on top.

We don't have a super clear release cadence at the moment, but it's likely to take weeks as this didn't make the boat for 0.26.0

mistercrunch avatar Jun 01 '18 15:06 mistercrunch

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

stale[bot] avatar Apr 10 '19 21:04 stale[bot]