Skip to content

Fix File Access Control & UI Issues in File Messages#72

Merged
nyerunkar merged 7 commits intomainfrom
access-control-page-ui-updation
Mar 18, 2026
Merged

Fix File Access Control & UI Issues in File Messages#72
nyerunkar merged 7 commits intomainfrom
access-control-page-ui-updation

Conversation

@girishjadhav-cosmica
Copy link
Member

📄 Summary

This MR addresses multiple issues related to file access control and UI inconsistencies in file messages across platforms.


🐛 Issues Fixed


🔧 Changes Implemented

🔒 Access Control Fix

  • Blocked file forwarding when user access is:

    • Revoked
    • Denied
    • Expired
  • Added backend validation to prevent API-level bypass

  • Added proper error response: "File access is no longer valid"

🎨 UI Improvements

  • Removed notification bell icon from group file messages

  • Hid file access status labels in iPhone group chat:

    • Access Until
    • Expired
    • Revoked
    • Denied
  • Ensured UI consistency and no layout break after changes


✅ Testing Done

🔒 Access Control

  • Verified users cannot forward files when access is revoked
  • Verified users cannot forward files when access is denied
  • Verified users cannot forward files when access is expired
  • Verified valid users can still forward files

🎨 UI Validation

  • Verified bell icon is not visible in group file messages
  • Verified file access status is hidden in iPhone group chat
  • Verified no UI/spacing issues after changes

📱 Cross-Checks

  • Tested on different screen sizes/devices (iOS)
  • Verified one-to-one chat remains unaffected
  • Performed regression testing for file send/receive functionality

…ccess, and file paste) #61

- Disable Share Extension activation so the app does not appear in the iOS Share Sheet
- Disable external document access via Files app (UIFileSharingEnabled=false, LSSupportsOpeningDocumentsInPlace=false)
- Block image/file paste from clipboard in chat input
- Allow text paste to continue working normally

Tests:
- Verify app does not appear in iOS Share Sheet
- Verify Files app cannot open files in the app
- Verify image/file paste from clipboard is blocked
- Verify text paste continues to work

This ensures files cannot be imported into the app from outside sources.
… and light theme UI #63

- Show owner information in Peer1 without status or permission icons
- Display shared user information in Peer2 with download/forward permissions
- Add access status messages (Access Until, File Expired, Access Revoked, Access Denied)
- Add forwarded users section
- Implement search functionality for forwarded users
- Show search bar only when forwarded users count is greater than 10
- Hide owner and shared sections during search
- Show "No Forwarded User found with <name>" when search has no results
- Append "(You)" label for owner (Peer1) and shared user (Peer2)
- Truncate long usernames while preserving "(You)" label
- Fix light theme visibility issues (back icon, search text, hint text, close icon)

Test:
- Verified owner information displays correctly in Peer1 without status icons
- Verified shared users show correct permissions and access status in Peer2
- Confirmed forwarded users appear in a separate section
- Verified search bar appears only when forwarded users count is greater than 10
- Tested forwarded user search functionality and empty state message
- Verified "(You)" label displays correctly even with long usernames
- Checked UI visibility in both Light and Dark themes
test: verified logs are visible only in Debug build and not in Release build
issur ref #65
- Disabled forward option in UI for revoked/denied/expired access
- Added backend validation to block forwarding without valid access
- Returned proper error response for invalid forward attempts
- Added unit and integration tests for access state scenarios

Tests Done:
- Verified user cannot forward file when access is revoked
- Verified user cannot forward file when access is denied
- Verified user cannot forward file when access is expired
- Verified authorized users can still forward files
- Verified API rejects direct forward requests without valid access
- Verified proper error message is returned ("File access is no longer valid")

Issur Ref #69
- Removed bell icon from group file message layout
- Set visibility to gone for unused notification icon
- Ensured no UI break or spacing issues after removal

Tests Done:
- Verified bell icon is not visible in group file messages
- Verified file message layout remains properly aligned
- Verified no spacing or UI break after removal
- Verified other message types are unaffected
- Verified behavior across different screen sizes/devices
- Performed regression testing for file send/receive functionality

Git Issue Ref #70
- Removed access status labels (Until / Expired / Revoked / Denied) from group file messages
- Improved UI clarity by hiding unnecessary access information
- Ensured layout remains consistent after removal

Tests Done:
- Verified access status is not visible in iPhone group chat file messages
- Verified UI layout and spacing remain intact
- Verified one-to-one chat behavior is unaffected
- Verified across different iPhone screen sizes
- Performed regression testing for file message functionality
Issue Ref #71
Copy link
Collaborator

@nyerunkar nyerunkar left a comment

Choose a reason for hiding this comment

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

Approved

@nyerunkar nyerunkar merged commit f394507 into main Mar 18, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

2 participants