From ac95ff9784285ee3987f8a3ffb659e49dbab653d Mon Sep 17 00:00:00 2001 From: Iziram Date: Wed, 26 Jun 2024 16:27:47 +0200 Subject: [PATCH] =?UTF-8?q?Assiduit=C3=A9=20:=20ajout=20permission=20"Just?= =?UTF-8?q?ifValidate"=20par=20d=C3=A9faut=20(si=20AbsChange)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- migrations/versions/60119446aab6_.py | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 migrations/versions/60119446aab6_.py diff --git a/migrations/versions/60119446aab6_.py b/migrations/versions/60119446aab6_.py new file mode 100644 index 00000000..aa0ad778 --- /dev/null +++ b/migrations/versions/60119446aab6_.py @@ -0,0 +1,36 @@ +"""justif_validate_permission + +Revision ID: 60119446aab6 +Revises: 07f37334727b +Create Date: 2024-06-26 16:20:12.283501 + +""" + +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = "60119446aab6" +down_revision = "07f37334727b" +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + # ### end Alembic commands ### + # Modification des permissions API + # AbsChange (1 << 13) = 8192 + # JustifValidate (1 << 51 ) = 2251799813685248 + op.execute( + """ + update role set permissions = permissions | 2251799813685248 where (permissions & 8192) <> 0; + """ + ) + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + # ### end Alembic commands ### + pass