Skip to content
Snippets Groups Projects
Commit 4254981f authored by Diego Sampaio's avatar Diego Sampaio
Browse files

Allow livechat managers to manage a livechat session

parent 980ae2a7
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@
{{/with}}
</div>
{{#if agentIsServing}}
{{#if canSeeButtons}}
<nav class="centered-buttons">
{{#if roomOpen}}
<button class='button lightblue edit-livechat button-block'><span><i class='icon-edit'></i> {{_ "Edit"}}</span></button>
......
......@@ -126,7 +126,11 @@ Template.visitorInfo.helpers({
}
},
agentIsServing() {
canSeeButtons() {
if (RocketChat.authz.hasRole(Meteor.userId(), 'livechat-manager')) {
return true;
}
const data = Template.currentData();
if (data && data.rid) {
const room = RocketChat.models.Rooms.findOne(data.rid);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment