@@ -150,7 +150,10 @@ class _GroupInfoScreenState extends State<GroupInfoScreen> {
150150              ),
151151              centerTitle:  true ,
152152              actions:  [
153-                 if  (! channel.channel.isDistinct &&  isOwner)
153+                 if  (! channel.channel.isDistinct && 
154+                     isOwner && 
155+                     channel.channel.ownCapabilities
156+                         .contains (PermissionType .updateChannelMembers))
154157                  StreamNeumorphicButton (
155158                    child:  InkWell (
156159                      onTap:  () {
@@ -365,6 +368,8 @@ class _GroupInfoScreenState extends State<GroupInfoScreen> {
365368            ),
366369            Expanded (
367370              child:  TextField (
371+                 enabled:  channel.ownCapabilities
372+                     .contains (PermissionType .updateChannel),
368373                focusNode:  _focusNode,
369374                controller:  _nameController,
370375                cursorColor: 
@@ -449,47 +454,50 @@ class _GroupInfoScreenState extends State<GroupInfoScreen> {
449454        //   ), 
450455        //   onTap: () {}, 
451456        // ), 
452-         StreamBuilder <bool >(
453-             stream:  StreamChannel .of (context).channel.isMutedStream,
454-             builder:  (context, snapshot) {
455-               mutedBool.value =  snapshot.data;
457+         if  (channel.channel.ownCapabilities
458+             .contains (PermissionType .muteChannel))
459+           StreamBuilder <bool >(
460+               stream:  StreamChannel .of (context).channel.isMutedStream,
461+               builder:  (context, snapshot) {
462+                 mutedBool.value =  snapshot.data;
456463
457-               return  OptionListTile (
458-                 tileColor:  StreamChatTheme .of (context).colorTheme.appBg,
459-                 separatorColor:  StreamChatTheme .of (context).colorTheme.disabled,
460-                 title:  AppLocalizations .of (context).muteGroup,
461-                 titleTextStyle:  StreamChatTheme .of (context).textTheme.body,
462-                 leading:  Padding (
463-                   padding:  const  EdgeInsets .symmetric (horizontal:  16.0 ),
464-                   child:  StreamSvgIcon .mute (
465-                     size:  24.0 ,
466-                     color:  StreamChatTheme .of (context)
467-                         .colorTheme
468-                         .textHighEmphasis
469-                         .withOpacity (0.5 ),
464+                 return  OptionListTile (
465+                   tileColor:  StreamChatTheme .of (context).colorTheme.appBg,
466+                   separatorColor: 
467+                       StreamChatTheme .of (context).colorTheme.disabled,
468+                   title:  AppLocalizations .of (context).muteGroup,
469+                   titleTextStyle:  StreamChatTheme .of (context).textTheme.body,
470+                   leading:  Padding (
471+                     padding:  const  EdgeInsets .symmetric (horizontal:  16.0 ),
472+                     child:  StreamSvgIcon .mute (
473+                       size:  24.0 ,
474+                       color:  StreamChatTheme .of (context)
475+                           .colorTheme
476+                           .textHighEmphasis
477+                           .withOpacity (0.5 ),
478+                     ),
470479                  ),
471-                 ),
472-                 trailing:  snapshot.data ==  null 
473-                     ?  CircularProgressIndicator ()
474-                     :  ValueListenableBuilder <bool ?>(
475-                         valueListenable:  mutedBool,
476-                         builder:  (context, value, _) {
477-                           return  CupertinoSwitch (
478-                             value:  value! ,
479-                             onChanged:  (val) {
480-                               mutedBool.value =  val;
480+                   trailing:  snapshot.data ==  null 
481+                       ?  CircularProgressIndicator ()
482+                       :  ValueListenableBuilder <bool ?>(
483+                           valueListenable:  mutedBool,
484+                           builder:  (context, value, _) {
485+                             return  CupertinoSwitch (
486+                               value:  value! ,
487+                               onChanged:  (val) {
488+                                 mutedBool.value =  val;
481489
482-                               if  (snapshot.data! ) {
483-                                 channel.channel.unmute ();
484-                               } else  {
485-                                 channel.channel.mute ();
486-                               }
487-                             },
488-                           );
489-                         }),
490-                 onTap:  () {},
491-               );
492-             }),
490+                                  if  (snapshot.data! ) {
491+                                    channel.channel.unmute ();
492+                                  } else  {
493+                                    channel.channel.mute ();
494+                                  }
495+                                },
496+                              );
497+                            }),
498+                    onTap:  () {},
499+                  );
500+                }),
493501        OptionListTile (
494502          title:  AppLocalizations .of (context).pinnedMessages,
495503          tileColor:  StreamChatTheme .of (context).colorTheme.appBg,
@@ -654,7 +662,9 @@ class _GroupInfoScreenState extends State<GroupInfoScreen> {
654662            );
655663          },
656664        ),
657-         if  (! channel.channel.isDistinct)
665+         if  (! channel.channel.isDistinct && 
666+             channel.channel.ownCapabilities
667+                 .contains (PermissionType .leaveChannel))
658668          OptionListTile (
659669            tileColor:  StreamChatTheme .of (context).colorTheme.appBg,
660670            separatorColor:  StreamChatTheme .of (context).colorTheme.disabled,
0 commit comments