Hide "Browse files" without the permission to list files
The channel menu (desktop) and channel sheet (Android) leave the entry out when i_ft_file_browse_power is 0. Unlike move/kick/ban powers it is among the needed permissions the server reports, and with it at 0 ftgetfilelist is refused even where the channel needs no power (verified on a local 3.13.7). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -637,6 +637,14 @@ public final class ServerSession {
|
||||
return permits("b_virtualserver_token_list");
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the server lets us list channel files ({@code i_ft_file_browse_power}); offered while
|
||||
* unknown. A channel may still need more power than we have, which only the server knows.
|
||||
*/
|
||||
public boolean canBrowseFiles() {
|
||||
return permits("i_ft_file_browse_power");
|
||||
}
|
||||
|
||||
/** Whether the server lets us upload an avatar ({@code i_client_max_avatar_filesize}); offered while unknown. */
|
||||
public boolean canSetAvatar() {
|
||||
return permits("i_client_max_avatar_filesize");
|
||||
|
||||
Reference in New Issue
Block a user