How to configure such that only the moderator sees "Start Recording" option?

When authentication was set to “anonymous”, only moderator could see “Start Recording” option (which was what we wanted). But after setting up JWT token-based authentication, both moderators and non-moderators (regular participants) see “Start Recording” option. Please suggest how to hide that option for those participants who are not moderators. Appreciate your help.

This is the js config file section on recording -

recordingService: {
// // When integrations like dropbox are enabled only that will be shown,
// // by enabling fileRecordingsServiceEnabled, we show both the integrations
// // and the generic recording service (its configuration and storage type
// // depends on jibri configuration)
enabled: true,

//     // Whether to show the possibility to share file recording with other people
//     // (e.g. meeting participants), based on the actual implementation
//     // on the backend.
     sharingEnabled: true,

//     // Hide the warning that says we only store the recording for 24 hours.
     hideStorageWarning: false,
 }

Do you have features option in the jwt?

Yes, I set all these options in the payload to generate the JWT as documented. Yet, the “Start Recording” option was visible.

“moderator”: “false”,
“features”: {
“livestreaming”: “false”,
“outbound-call”: “false”,
“transcription”: “false”,
“recording”: “false”
}

Have you tried removing that and see how it behaves?

If I remember correctly features implies you need to controll that from the config to hide the buttons … Via the iframeAPI configOverwrite.

I had not provided them initially. I tried adding them only when I saw that the Start recording option was not being hidden.

Are you sure participant seeing it is not moderator?
Have you verified it in the console?

I have confirmed in two ways that the participant is not moderator - 1) Participants list - this participant does not have “Moderator” mentioned under his name while the other one has 2) Settings - this participant does not have “Moderator” tab while the other one has. Hope those two features are an accurate reflection of participant role ?

One thing I observed now is that though “Start Recording” option is displayed for non-moderator, when I choose it I get an error “Recording failed to start”. For a moderator, recording works. So I just need to hide that option through the JWT token I guess. Wonder why it is not working as per the documentation.

Have you enabled local recording?

Not explicitly, that section is commented in the js

Add username into tokens

Sorry, I did not get you. This is the full payload that we use to generate the jwt token. What else is to be done to hide “Start Recording” option ?

{
“context”: {
“user”: {
“name”: “Participant name”,
“id”: “”,
“affiliation”: “member”
}
},
“moderator”: “false”,
“features”: {
“livestreaming”: “false”,
“outbound-call”: “false”,
“transcription”: “false”,
“recording”: “false”
},
“aud”: “jitsi”,
“iss”: “”,
“sub”: “meet.MYDOMAIN.com”,
“room”: “”
}

I meant that the token must have context.user.name field but you have already that.

How do you create the token?
Did you try the boolean fields without quotation marks?

{
  "aud": "myappid",
  "iss": "myappid",
  "sub": "*",
  "room": "*",
  "iat": 1681989117,
  "nbf": 1681988820,
  "exp": 1682003220,
  "context": {
    "user": {
      "name": "hello"
    },
    "features": {
      "recording": true,
      "livestreaming": false
    }
  }
}

Yes, I tried both options - with and without quotes for the boolean. To no avail. They are just getting ignored

What is your Jitsi version?

$ dpkg -l | grep jitsi
ii jitsi-meet 2.0.8319-1 all WebRTC JavaScript video conferences
ii jitsi-meet-prosody 1.0.6991-1 all Prosody configuration for Jitsi Meet
ii jitsi-meet-tokens 1.0.6991-1 all Prosody token authentication plugin for Jitsi Meet
ii jitsi-meet-turnserver 1.0.6991-1 all Configures coturn to be used with Jitsi Meet
ii jitsi-meet-web 1.0.6991-1 all WebRTC JavaScript video conferences
ii jitsi-meet-web-config 1.0.6991-1 all Configuration for web serving of Jitsi Meet
ii jitsi-videobridge2 2.2-79-gf6426ea0-1 all WebRTC compatible Selective Forwarding Unit (SFU)
ii lua-basexx 0.4.1-jitsi1 all baseXX encoding/decoding library for Lua
ii lua-cjson:amd64 2.1.0.10-jitsi1 amd64 JSON parser/encoder for Lua

Is this proper version ?

Yes, you have the latest stable

Thanks, that is good but why are my config settings in JWT token getting ignored then ?

@emrah @damencho Please let me know if you see any other possible reason for this issue