feat: local browser saves with opt-in cloud sync behind saves.cloud permission
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4418da47eb
commit
47fc121e7d
8 files changed
+377
-31
No files matched your search
@@ -0,0 +1,18 @@
|
||||
"""Cloud saves became an explicit permission; keep them for existing system roles."""
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
revision = "0004"
|
||||
down_revision = "0003"
|
||||
branch_labels = depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.get_bind().execute(sa.text(
|
||||
"UPDATE roles SET permissions = array_append(permissions, 'saves.cloud') "
|
||||
"WHERE is_system AND name IN ('moderator', 'player') AND NOT ('saves.cloud' = ANY(permissions))"))
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.get_bind().execute(sa.text(
|
||||
"UPDATE roles SET permissions = array_remove(permissions, 'saves.cloud')"))
|
||||
Reference in new issue
Block a user