Skip to content
This repository was archived by the owner on Nov 5, 2025. It is now read-only.

Conversation

@d-gubert
Copy link
Member

What? β›΅

Fix wrong permission validation for livechat bridge

Why? πŸ€”

It's a fix. It's self explanatory

Links 🌎

PS πŸ‘€

@cuonghuunguyen
Copy link
Contributor

cuonghuunguyen commented Jun 29, 2021

Hi, could u cover the the bug in #430 also pls?

@d-gubert d-gubert marked this pull request as ready for review June 29, 2021 21:23
@d-gubert d-gubert merged commit 44bac3f into alpha Jun 29, 2021
@d-gubert
Copy link
Member Author

Hey @cuonghuunguyen ! This fix covers exactly that bug :)

@cuonghuunguyen
Copy link
Contributor

Thank you very much!

@felipetomm
Copy link

Hi @d-gubert !
I think that issue persist partially. We have Apps runing in RocketChat 3.16.1 and 3.15.3 enterprise.
For example, an specific method getLivechatDepartmentByIdOrName, used for Omnichannel Apps, like Whatsapp and Telegram, run normally in the server on version 3.15.3, but in 3.16.1, the result from this method is undefined.

Please, can you review this?

@cuonghuunguyen
Copy link
Contributor

Thats because while refactoring, they didnt add all permissions into defaultPermission

@felipetomm
Copy link

Hmm, but i think the permission of that method is livechat-department, right?
Has any way to adjust this without an RC release? I try add this in my App.json, but has no success:

...
"implements": [
        "IPostLivechatRoomStarted"
    ],
    "permissions": [
        {
            "name": "livechat-department.read"
        }
    ]
}

@felipetomm
Copy link

Ok.. with server logs, i find the correct permission: livechat-department.multiple, and that's ok for my App.
But, with external Apps, the solution is an Apps-Engine fix?

@d-gubert
Copy link
Member Author

d-gubert commented Jul 1, 2021

@felipetomm the livechat-department.multiple permission is only required for grabbing multiple departments with the getDepartmentsEnabledWithAgents method, other methods should work with Β΄livechat-department.read` as well. EDIT: I've found the problem regarding this, and you're right, this PR only solved it partially.

Regarding the difference in the apps, we'll be reviewing that.

@cuonghuunguyen the list of default permissions hasn't changed with the refactoring. But new permissions introduced after the permission system was implemented will not be part of this permission set. Currently, we have 2 permissions that are not default, IIRC: cloud.workspace-token and livechat-department.multiple

@felipetomm
Copy link

Thanks @d-gubert !

@murtaza98
Copy link
Contributor

murtaza98 commented Jul 6, 2021

Hi @d-gubert !
I think that issue persist partially. We have Apps runing in RocketChat 3.16.1 and 3.15.3 enterprise.
For example, an specific method getLivechatDepartmentByIdOrName, used for Omnichannel Apps, like Whatsapp and Telegram, run normally in the server on version 3.15.3, but in 3.16.1, the result from this method is undefined.

Please, can you review this?

Hey guys, this should be fixed with this PR: RocketChat/Rocket.Chat#22587
It's currently under review and if all goes well, it will be released with the next core release

@d-gubert d-gubert deleted the fix/livechat-permission branch May 2, 2024 21:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants