[PR #8023] [MERGED] fix: permission control doesn't work when opening the page at the first time #8275

Closed
opened 2026-03-23 23:23:26 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/8023
Author: @LucasXu0
Created: 6/4/2025
Status: Merged
Merged: 6/5/2025
Merged by: @LucasXu0

Base: mainHead: guest_role_issues


📝 Commits (10+)

  • beb7e95 fix: permission control doesn't work when opening the page at the first time
  • 72551d2 feat: enable tracing events cost time
  • 9955522 feat: leave shared page via ... menu
  • ae77fa2 fix: hide the create page button if user is guest
  • 6ce36bb feat: disable publish button if user is a guest
  • 2c78acd feat: add shared user table
  • 9e4ffd4 feat: integrate sql into folder manager
  • d250d75 feat: integrate shared user notification
  • bcf87c2 fix: flutter analyze
  • 613529f fix: revert local shared user data

📊 Changes

69 files changed (+1219 additions, -226 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/core/config/kv_keys.dart (+5 -0)
📝 frontend/appflowy_flutter/lib/features/page_access_level/data/repositories/page_access_level_repository.dart (+4 -0)
📝 frontend/appflowy_flutter/lib/features/page_access_level/data/repositories/rust_page_access_level_repository_impl.dart (+73 -8)
📝 frontend/appflowy_flutter/lib/features/page_access_level/logic/page_access_level_state.dart (+1 -2)
📝 frontend/appflowy_flutter/lib/features/share_tab/data/repositories/local_share_with_user_repository_impl.dart (+14 -0)
📝 frontend/appflowy_flutter/lib/features/share_tab/data/repositories/rust_share_with_user_repository_impl.dart (+32 -5)
📝 frontend/appflowy_flutter/lib/features/share_tab/data/repositories/share_with_user_repository.dart (+10 -0)
📝 frontend/appflowy_flutter/lib/features/share_tab/logic/share_tab_bloc.dart (+74 -0)
📝 frontend/appflowy_flutter/lib/features/share_tab/logic/share_tab_event.dart (+20 -0)
📝 frontend/appflowy_flutter/lib/features/share_tab/logic/share_tab_state.dart (+9 -2)
📝 frontend/appflowy_flutter/lib/features/share_tab/presentation/share_tab.dart (+18 -2)
frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/upgrade_to_pro_widget.dart (+88 -0)
📝 frontend/appflowy_flutter/lib/features/shared_section/data/repositories/local_shared_pages_repository_impl.dart (+5 -0)
📝 frontend/appflowy_flutter/lib/features/shared_section/data/repositories/rust_shared_pages_repository_impl.dart (+36 -1)
📝 frontend/appflowy_flutter/lib/features/shared_section/data/repositories/shared_pages_repository.dart (+3 -0)
📝 frontend/appflowy_flutter/lib/features/shared_section/logic/shared_section_bloc.dart (+24 -0)
📝 frontend/appflowy_flutter/lib/features/shared_section/logic/shared_section_event.dart (+13 -0)
📝 frontend/appflowy_flutter/lib/features/shared_section/presentation/m_shared_section.dart (+2 -1)
📝 frontend/appflowy_flutter/lib/features/shared_section/presentation/shared_section.dart (+16 -5)
📝 frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/refresh_button.dart (+1 -3)

...and 49 more files

📄 Description

Feature Preview


PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

Summary by Sourcery

Fix permission control on initial page load by defaulting share access to read-only and switching to Rust backend implementations for sharing repositories; lower view log verbosity.

Bug Fixes:

  • Default share access level fallback and initial state changed to readOnly instead of readAndWrite to correct permission control.
  • Replace local mock repositories with Rust-based implementations for share button and shared section to use real backend data.

Enhancements:

  • Change view operation log statements from info to debug to reduce log noise.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/8023 **Author:** [@LucasXu0](https://github.com/LucasXu0) **Created:** 6/4/2025 **Status:** ✅ Merged **Merged:** 6/5/2025 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `guest_role_issues` --- ### 📝 Commits (10+) - [`beb7e95`](https://github.com/AppFlowy-IO/AppFlowy/commit/beb7e958e76a7a5d882b7c24bd5cb922e3529049) fix: permission control doesn't work when opening the page at the first time - [`72551d2`](https://github.com/AppFlowy-IO/AppFlowy/commit/72551d216d04b14b6305bf417e7f82cb0931400d) feat: enable tracing events cost time - [`9955522`](https://github.com/AppFlowy-IO/AppFlowy/commit/99555228d6a61cb301d0d6727e8611d840052b7a) feat: leave shared page via ... menu - [`ae77fa2`](https://github.com/AppFlowy-IO/AppFlowy/commit/ae77fa2d4f8927ccb7b09f161a5f8611f3975df3) fix: hide the create page button if user is guest - [`6ce36bb`](https://github.com/AppFlowy-IO/AppFlowy/commit/6ce36bbaa4baf061cc7f78bc38e0d23f2062b491) feat: disable publish button if user is a guest - [`2c78acd`](https://github.com/AppFlowy-IO/AppFlowy/commit/2c78acdbad71c88774aa95a20ec44f08f6146929) feat: add shared user table - [`9e4ffd4`](https://github.com/AppFlowy-IO/AppFlowy/commit/9e4ffd44035fe5201cea0903bfbaa515428d78f2) feat: integrate sql into folder manager - [`d250d75`](https://github.com/AppFlowy-IO/AppFlowy/commit/d250d7579984c5f3b2696572849fc777dda730a2) feat: integrate shared user notification - [`bcf87c2`](https://github.com/AppFlowy-IO/AppFlowy/commit/bcf87c2b002c90b7560cf06a8342a38c19164459) fix: flutter analyze - [`613529f`](https://github.com/AppFlowy-IO/AppFlowy/commit/613529f342e9a86e18bffc04c6aef3bf424f08db) fix: revert local shared user data ### 📊 Changes **69 files changed** (+1219 additions, -226 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/core/config/kv_keys.dart` (+5 -0) 📝 `frontend/appflowy_flutter/lib/features/page_access_level/data/repositories/page_access_level_repository.dart` (+4 -0) 📝 `frontend/appflowy_flutter/lib/features/page_access_level/data/repositories/rust_page_access_level_repository_impl.dart` (+73 -8) 📝 `frontend/appflowy_flutter/lib/features/page_access_level/logic/page_access_level_state.dart` (+1 -2) 📝 `frontend/appflowy_flutter/lib/features/share_tab/data/repositories/local_share_with_user_repository_impl.dart` (+14 -0) 📝 `frontend/appflowy_flutter/lib/features/share_tab/data/repositories/rust_share_with_user_repository_impl.dart` (+32 -5) 📝 `frontend/appflowy_flutter/lib/features/share_tab/data/repositories/share_with_user_repository.dart` (+10 -0) 📝 `frontend/appflowy_flutter/lib/features/share_tab/logic/share_tab_bloc.dart` (+74 -0) 📝 `frontend/appflowy_flutter/lib/features/share_tab/logic/share_tab_event.dart` (+20 -0) 📝 `frontend/appflowy_flutter/lib/features/share_tab/logic/share_tab_state.dart` (+9 -2) 📝 `frontend/appflowy_flutter/lib/features/share_tab/presentation/share_tab.dart` (+18 -2) ➕ `frontend/appflowy_flutter/lib/features/share_tab/presentation/widgets/upgrade_to_pro_widget.dart` (+88 -0) 📝 `frontend/appflowy_flutter/lib/features/shared_section/data/repositories/local_shared_pages_repository_impl.dart` (+5 -0) 📝 `frontend/appflowy_flutter/lib/features/shared_section/data/repositories/rust_shared_pages_repository_impl.dart` (+36 -1) 📝 `frontend/appflowy_flutter/lib/features/shared_section/data/repositories/shared_pages_repository.dart` (+3 -0) 📝 `frontend/appflowy_flutter/lib/features/shared_section/logic/shared_section_bloc.dart` (+24 -0) 📝 `frontend/appflowy_flutter/lib/features/shared_section/logic/shared_section_event.dart` (+13 -0) 📝 `frontend/appflowy_flutter/lib/features/shared_section/presentation/m_shared_section.dart` (+2 -1) 📝 `frontend/appflowy_flutter/lib/features/shared_section/presentation/shared_section.dart` (+16 -5) 📝 `frontend/appflowy_flutter/lib/features/shared_section/presentation/widgets/refresh_button.dart` (+1 -3) _...and 49 more files_ </details> ### 📄 Description <!--- Thank you for submitting a pull request to AppFlowy. The team will dedicate their best efforts to reviewing and approving your pull request. If you have any questions about the project or feedback for us, please join our [Discord](https://discord.gg/wdjWUXXhtw). --> <!--- If your pull request adds a new feature, please drag and drop a video into this section to showcase what you've done! If not, you may delete this section. --> ### Feature Preview <!--- List at least one issue here that this PR addresses. If it fixes the issue, please use the [fixes](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) keyword to close the issue. For example: fixes https://github.com/AppFlowy-IO/AppFlowy/pull/2106 --> --- <!--- Before you mark this PR ready for review, run through this checklist! --> #### PR Checklist - [x] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [x] I've listed at least one issue that this PR fixes in the description above. - [x] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [x] All existing tests are passing. ## Summary by Sourcery Fix permission control on initial page load by defaulting share access to read-only and switching to Rust backend implementations for sharing repositories; lower view log verbosity. Bug Fixes: - Default share access level fallback and initial state changed to readOnly instead of readAndWrite to correct permission control. - Replace local mock repositories with Rust-based implementations for share button and shared section to use real backend data. Enhancements: - Change view operation log statements from info to debug to reduce log noise. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 23:23:26 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#8275
No description provided.