Skip to content

feat: support dataset permission migrate to rbac#38166

Merged
fatelei merged 1 commit into
langgenius:mainfrom
fatelei:dataset_migrate_rbac
Jun 30, 2026
Merged

feat: support dataset permission migrate to rbac#38166
fatelei merged 1 commit into
langgenius:mainfrom
fatelei:dataset_migrate_rbac

Conversation

@fatelei

@fatelei fatelei commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

support migrate dataset permission to rbac service

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

@fatelei fatelei requested a review from QuantumGhost as a code owner June 29, 2026 10:02
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 29, 2026
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 51.49% 51.49% +0.01%
Strict coverage 51.00% 51.01% +0.01%
Typed symbols 30,849 30,861 +12
Untyped symbols 29,346 29,350 +4
Modules 2932 2932 0

@fatelei fatelei force-pushed the dataset_migrate_rbac branch from 87f2baf to 8c2030d Compare June 30, 2026 03:37
@fatelei fatelei requested a review from laipz8200 as a code owner June 30, 2026 03:37
Comment thread api/commands/rbac.py Outdated
Comment thread api/commands/rbac.py Outdated
Comment thread api/commands/rbac.py Outdated
Comment thread api/commands/rbac.py Outdated
Comment thread api/commands/rbac.py
Comment thread api/commands/rbac.py Outdated
Comment thread api/commands/rbac.py Outdated
Comment thread api/commands/rbac.py Outdated
Comment thread api/tests/unit_tests/commands/test_legacy_model_type_migration.py
@fatelei fatelei force-pushed the dataset_migrate_rbac branch from 8c2030d to 48d302a Compare June 30, 2026 04:06
@fatelei fatelei requested a review from GareArc as a code owner June 30, 2026 04:06
@QuantumGhost

This comment was marked as outdated.

@fatelei fatelei force-pushed the dataset_migrate_rbac branch from 48d302a to ba38a99 Compare June 30, 2026 04:47
@GareArc

GareArc commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Need to resolve conflict first.

@fatelei fatelei force-pushed the dataset_migrate_rbac branch from ba38a99 to 9a8a0c4 Compare June 30, 2026 05:25
@fatelei

fatelei commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

Need to resolve conflict first.

done

@github-actions

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-06-30 05:27:20.478264568 +0000
+++ /tmp/pyrefly_pr.txt	2026-06-30 05:27:10.481196008 +0000
@@ -1938,28 +1938,34 @@
   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:36:38
 ERROR Object of class `FromClause` has no attribute `insert` [missing-attribute]
    --> tests/unit_tests/commands/test_legacy_model_type_migration.py:204:13
+ERROR Argument `list[SimpleNamespace] | list[Unknown]` is not assignable to parameter `rows` with type `list[object]` in function `FakeExecuteResult.__init__` [bad-argument-type]
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:405:38
+ERROR Object of class `object` has no attribute `scope` [missing-attribute]
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:429:12
+ERROR Argument `list[SimpleNamespace] | list[Unknown]` is not assignable to parameter `rows` with type `list[object]` in function `FakeExecuteResult.__init__` [bad-argument-type]
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:461:38
 ERROR Object of class `object` has no attribute `callback` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:383:5
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:551:5
 ERROR Object of class `object` has no attribute `callback` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:444:5
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:612:5
 ERROR Object of class `TextIOBase` has no attribute `name` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:457:17
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:625:17
 ERROR Class `object` has no class attribute `__table__` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:541:48
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:709:48
 ERROR Class `object` has no class attribute `__table__` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:620:48
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:788:48
 ERROR Class `object` has no class attribute `__table__` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:723:48
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:891:48
 ERROR Class `object` has no class attribute `__table__` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:801:48
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:969:48
 ERROR Class `object` has no class attribute `__table__` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:856:42
+    --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1024:42
 ERROR Class member `SlowLineOutput.write` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:924:13
+    --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1092:13
 ERROR Argument `object` is not assignable to parameter `orig` with type `BaseException` in function `sqlalchemy.exc.DBAPIError.__init__` [bad-argument-type]
-    --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1226:44
+    --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1394:44
 ERROR Argument `SimpleNamespace` is not assignable to parameter `orig` with type `BaseException` in function `sqlalchemy.exc.DBAPIError.__init__` [bad-argument-type]
-    --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1250:57
+    --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1418:57
 ERROR Expected a callable, got `None` [not-callable]
   --> tests/unit_tests/commands/test_reset_encrypt_key_pair.py:18:9
 ERROR Object of class `ModuleType` has no attribute `upgrade` [missing-attribute]

@GareArc GareArc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 30, 2026
@fatelei fatelei added this pull request to the merge queue Jun 30, 2026
Merged via the queue into langgenius:main with commit 528bf95 Jun 30, 2026
31 checks passed
@fatelei fatelei deleted the dataset_migrate_rbac branch June 30, 2026 06:59
GareArc pushed a commit that referenced this pull request Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants