-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix call to deprecated circles api #35030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -46,10 +46,10 @@ | |||||
|
|
||||||
| use OC\Files\FileInfo; | ||||||
| use OC\Files\Storage\Wrapper\Wrapper; | ||||||
| use OCA\Files\Helper; | ||||||
| use OCA\Files_Sharing\Exceptions\SharingRightsException; | ||||||
| use OCA\Files_Sharing\External\Storage; | ||||||
| use OCA\Files_Sharing\SharedStorage; | ||||||
| use OCA\Files\Helper; | ||||||
| use OCP\App\IAppManager; | ||||||
| use OCP\AppFramework\Http\DataResponse; | ||||||
| use OCP\AppFramework\OCS\OCSBadRequestException; | ||||||
|
|
@@ -59,9 +59,9 @@ | |||||
| use OCP\AppFramework\OCSController; | ||||||
| use OCP\AppFramework\QueryException; | ||||||
| use OCP\Constants; | ||||||
| use OCP\Files\Folder; | ||||||
| use OCP\Files\InvalidPathException; | ||||||
| use OCP\Files\IRootFolder; | ||||||
| use OCP\Files\Folder; | ||||||
| use OCP\Files\Node; | ||||||
| use OCP\Files\NotFoundException; | ||||||
| use OCP\IConfig; | ||||||
|
|
@@ -74,7 +74,6 @@ | |||||
| use OCP\IUserManager; | ||||||
| use OCP\Lock\ILockingProvider; | ||||||
| use OCP\Lock\LockedException; | ||||||
| use OCP\Share; | ||||||
| use OCP\Share\Exceptions\GenericShareException; | ||||||
| use OCP\Share\Exceptions\ShareNotFound; | ||||||
| use OCP\Share\IManager; | ||||||
|
|
@@ -1797,12 +1796,16 @@ private function shareProviderResharingRights(string $userId, IShare $share, $no | |||||
| $sharedWith = substr($share->getSharedWith(), $shareWithStart, $shareWithLength); | ||||||
| } | ||||||
| try { | ||||||
| $member = \OCA\Circles\Api\v1\Circles::getMember($sharedWith, $userId, 1); | ||||||
| if ($member->getLevel() >= 4) { | ||||||
| return true; | ||||||
| } | ||||||
| // checking if user is within said circle | ||||||
| // deprecated API, needs to be edited when ICirclesManager is implemented | ||||||
| \OCA\Circles\Api\v1\Circles::getMember($sharedWith, $userId, 1); | ||||||
juliusknorr marked this conversation as resolved.
Show resolved
Hide resolved
Check noticeCode scanning / Psalm UndefinedClass
Class, interface or enum named OCA\Circles\Api\v1\Circles does not exist
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a stub for that in build/stubs and psalm.xml ? :) |
||||||
|
|
||||||
| return true; | ||||||
| } catch (\OCA\Circles\Exceptions\MembershipNotFoundException $e) { | ||||||
| return false; | ||||||
| } catch (QueryException $e) { | ||||||
| } catch (\Exception $e) { | ||||||
come-nc marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| \OC::$server->getLogger()->logException($e); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. better even from |
||||||
|
|
||||||
| return false; | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.