Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated canAccessRoom method still present in v7.4.0 #35432

Open
blackmamba1231 opened this issue Mar 8, 2025 · 2 comments · May be fixed by #35436
Open

Remove deprecated canAccessRoom method still present in v7.4.0 #35432

blackmamba1231 opened this issue Mar 8, 2025 · 2 comments · May be fixed by #35436

Comments

@blackmamba1231
Copy link

Description

The canAccessRoom Meteor method in server/methods/canAccessRoom.ts is marked as deprecated with a warning message indicating it will be removed after version 5.0. This method is only enabled when the environment variable ALLOW_CANACCESSROOM_METHOD is set to "yes" or "true".

Expected Behavior

The deprecated method should be removed, and any code relying on it should use the canAccessRoomAsync function from the Authorization service directly.

Current Behavior

The deprecated method is still available when the environment variable is set, displaying a warning message:
console.warn('Method canAccessRoom is deprecated and will be removed after version 5.0');

Steps to Reproduce

  1. Set environment variable ALLOW_CANACCESSROOM_METHOD=true
  2. Start Rocket.Chat server
  3. Check server logs for the deprecation warning

Relevant Code

// server/methods/canAccessRoom.ts
if (['yes', 'true'].includes(String(process.env.ALLOW_CANACCESSROOM_METHOD).toLowerCase())) {
  console.warn('Method canAccessRoom is deprecated and will be removed after version 5.0');
  Meteor.methods<ServerMethods>({
    async canAccessRoom(rid, userId, extraData) {
      // Method implementation
    }
  });
}
@blackmamba1231
Copy link
Author

i'd like to work on fixing it

@blackmamba1231 blackmamba1231 changed the title Remove deprecated canAccessRoom method scheduled for removal after v5.0 Remove deprecated canAccessRoom method still present in v7.4.0 Mar 8, 2025
@blackmamba1231
Copy link
Author

The method was scheduled for removal after v5.0
It's still present in v7.4.0
This represents technical debt that should be addressed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant