@@ -909,99 +909,90 @@ public function userDeletedFromGroup($uid, $gid) {
909909 }
910910
911911 /**
912- * check if users from other Nextcloud instances are allowed to mount public links share by this instance
913- *
914- * @return bool
912+ * Check if users from other Nextcloud instances are allowed to mount public links share by this instance
915913 */
916- public function isOutgoingServer2serverShareEnabled () {
914+ public function isOutgoingServer2serverShareEnabled (): bool {
917915 if ($ this ->gsConfig ->onlyInternalFederation ()) {
918916 return false ;
919917 }
920918 $ result = $ this ->config ->getAppValue ('files_sharing ' , 'outgoing_server2server_share_enabled ' , 'yes ' );
921- return ( $ result === 'yes ' ) ;
919+ return $ result === 'yes ' ;
922920 }
923921
924922 /**
925- * check if users are allowed to mount public links from other Nextclouds
926- *
927- * @return bool
923+ * Check if users are allowed to mount public links from other Nextclouds
928924 */
929- public function isIncomingServer2serverShareEnabled () {
925+ public function isIncomingServer2serverShareEnabled (): bool {
930926 if ($ this ->gsConfig ->onlyInternalFederation ()) {
931927 return false ;
932928 }
933929 $ result = $ this ->config ->getAppValue ('files_sharing ' , 'incoming_server2server_share_enabled ' , 'yes ' );
934- return ( $ result === 'yes ' ) ;
930+ return $ result === 'yes ' ;
935931 }
936932
937933
938934 /**
939- * check if users from other Nextcloud instances are allowed to send federated group shares
940- *
941- * @return bool
935+ * Check if users from other Nextcloud instances are allowed to send federated group shares
942936 */
943- public function isOutgoingServer2serverGroupShareEnabled () {
937+ public function isOutgoingServer2serverGroupShareEnabled (): bool {
944938 if ($ this ->gsConfig ->onlyInternalFederation ()) {
945939 return false ;
946940 }
947941 $ result = $ this ->config ->getAppValue ('files_sharing ' , 'outgoing_server2server_group_share_enabled ' , 'no ' );
948- return ( $ result === 'yes ' ) ;
942+ return $ result === 'yes ' ;
949943 }
950944
951945 /**
952- * check if users are allowed to receive federated group shares
953- *
954- * @return bool
946+ * Check if users are allowed to receive federated group shares
955947 */
956- public function isIncomingServer2serverGroupShareEnabled () {
948+ public function isIncomingServer2serverGroupShareEnabled (): bool {
957949 if ($ this ->gsConfig ->onlyInternalFederation ()) {
958950 return false ;
959951 }
960952 $ result = $ this ->config ->getAppValue ('files_sharing ' , 'incoming_server2server_group_share_enabled ' , 'no ' );
961- return ( $ result === 'yes ' ) ;
953+ return $ result === 'yes ' ;
962954 }
963955
964956 /**
965- * check if federated group sharing is supported, therefore the OCM API need to be enabled
966- *
967- * @return bool
957+ * Check if federated group sharing is supported, therefore the OCM API need to be enabled
968958 */
969- public function isFederatedGroupSharingSupported () {
959+ public function isFederatedGroupSharingSupported (): bool {
970960 return $ this ->cloudFederationProviderManager ->isReady ();
971961 }
972962
973963 /**
974964 * Check if querying sharees on the lookup server is enabled
975- *
976- * @return bool
977965 */
978- public function isLookupServerQueriesEnabled () {
966+ public function isLookupServerQueriesEnabled (): bool {
979967 // in a global scale setup we should always query the lookup server
980968 if ($ this ->gsConfig ->isGlobalScaleEnabled ()) {
981969 return true ;
982970 }
983971 $ result = $ this ->config ->getAppValue ('files_sharing ' , 'lookupServerEnabled ' , 'yes ' );
984- return ( $ result === 'yes ' ) ;
972+ return $ result === 'yes ' ;
985973 }
986974
987975
988976 /**
989977 * Check if it is allowed to publish user specific data to the lookup server
990- *
991- * @return bool
992978 */
993- public function isLookupServerUploadEnabled () {
979+ public function isLookupServerUploadEnabled (): bool {
994980 // in a global scale setup the admin is responsible to keep the lookup server up-to-date
995981 if ($ this ->gsConfig ->isGlobalScaleEnabled ()) {
996982 return false ;
997983 }
998984 $ result = $ this ->config ->getAppValue ('files_sharing ' , 'lookupServerUploadEnabled ' , 'yes ' );
999- return ( $ result === 'yes ' ) ;
985+ return $ result === 'yes ' ;
1000986 }
1001987
1002988 /**
1003- * @inheritdoc
989+ * Check if auto accepting incoming shares from trusted servers is enabled
1004990 */
991+ public function isFederatedTrustedShareAutoAccept (): bool {
992+ $ result = $ this ->config ->getAppValue ('files_sharing ' , 'federatedTrustedShareAutoAccept ' , 'yes ' );
993+ return $ result === 'yes ' ;
994+ }
995+
1005996 public function getAccessList ($ nodes , $ currentAccess ) {
1006997 $ ids = [];
1007998 foreach ($ nodes as $ node ) {
0 commit comments