mirror of
https://github.com/getredash/redash.git
synced 2026-03-21 07:00:07 -04:00
The issue is, if you try to revoke the permission of a user from an object, all the permissions on this object get removed. The fix is assigning filtered query object to it's own reference. According to SQLAlchemy documentation, `filter` method applies to the **copy** of the query object which means calling filter doesn't affect the object receiving filter call. For more information; http://docs.sqlalchemy.org/en/latest/orm/query.html#sqlalchemy.orm.query.Query.filter