Skip to content

Commit e14de18

Browse files
committed
refactor(utils): Mark share related methods as deprecated
The underlying OC_Utils methods are already deprecated Signed-off-by: Carl Schwan <carlschwan@kde.org>
1 parent 7cca544 commit e14de18

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

apps/settings/lib/Settings/Admin/Sharing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function getForm() {
5858
'restrictUserEnumerationFullMatchDisplayname' => $this->shareManager->matchDisplayName(),
5959
'restrictUserEnumerationFullMatchEmail' => $this->shareManager->matchEmail(),
6060
'restrictUserEnumerationFullMatchIgnoreSecondDN' => $this->shareManager->ignoreSecondDisplayName(),
61-
'enforceLinksPassword' => Util::isPublicLinkPasswordRequired(false),
61+
'enforceLinksPassword' => $this->shareManager->shareApiLinkEnforcePassword(false),
6262
'enforceLinksPasswordExcludedGroups' => json_decode($excludedPasswordGroups) ?? [],
6363
'enforceLinksPasswordExcludedGroupsEnabled' => $this->config->getSystemValueBool('sharing.allow_disabled_password_enforcement_groups', false),
6464
'onlyShareWithGroupMembers' => $this->shareManager->shareWithGroupMembersOnly(),

lib/public/Util.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,15 +592,18 @@ public static function naturalSortCompare($a, $b) {
592592
* @param bool $checkGroupMembership Check group membership exclusion
593593
* @return boolean
594594
* @since 7.0.0
595+
* @deprecated 34.0.0 use OCP\Share\IManager's shareApiLinkEnforcePassword directly
595596
*/
596597
public static function isPublicLinkPasswordRequired(bool $checkGroupMembership = true) {
597598
return \OC_Util::isPublicLinkPasswordRequired($checkGroupMembership);
598599
}
599600

600601
/**
601-
* check if share API enforces a default expire date
602+
* Check if share API enforces a default expire date
603+
*
602604
* @return boolean
603605
* @since 8.0.0
606+
* @deprecated 34.0.0 use OCP\Share\IManager's shareApiLinkDefaultExpireDateEnforced directly
604607
*/
605608
public static function isDefaultExpireDateEnforced() {
606609
return \OC_Util::isDefaultExpireDateEnforced();

0 commit comments

Comments
 (0)