#903 1.3.35 Delete warehouse - permission denied


DELETE FROM warehouse
WHERE id = ?
ERROR: permission denied for relation warehouse


  • Pongracz Istvan

    Pongracz Istvan - 2014-01-09

    Anyway, it is by design? If not, I think I can fix it.

  • Pongracz Istvan

    Pongracz Istvan - 2014-01-09
    CREATE ROLE "lsmb_demo__warehouse_delete" WITH INHERIT NOLOGIN;
    GRANT DELETE ON warehouse TO "lsmb_demo__warehouse_delete";

    With this role and permission you are able to set permission for delete.
    Of course, instead of demo, you have to write your own database name, or in Roles.sql/Fixes.sql the
    <?lsmb dbname ?>

    My question, what happens, if a warehouse deleted, while there are items under the warehouse?

    Last edit: Pongracz Istvan 2014-01-09
  • Pongracz Istvan

    Pongracz Istvan - 2014-01-09

    Fixed in [r6428]

    New role and permission added for delete, so, if a user has no rights to delete, he/she will not able to delete an existing warehouse.

    Please note: I did not find trigger for deleting warehouse - which enable or disable the delete based on items in that warehouse - , so, I cannot predict at this moment, what happens if there are items in the specified warehouse.

    Delete is useful when one build up a warehouse system but accidentaly setup more than enough or want to wipe out never-used-warehouses. In other words, it could be handy on system setup.



    Commit: <Commit 5164860434309d2e82ce4139:6428>

  • Pongracz Istvan

    Pongracz Istvan - 2014-01-09


  • Pongracz Istvan

    Pongracz Istvan - 2014-01-09
    • status: open --> closed-fixed
    • assigned_to: Pongracz Istvan