Skip to content

Conversation

@ArtificialOwl
Copy link
Member

@ArtificialOwl ArtificialOwl commented Mar 24, 2022

  • Allow an App to gain control over a Circle:
		/** @var CirclesManager $circleManager */
		$circleManager = \OC::$server->get(CirclesManager::class);
		$circleManager->startSuperSession();
		$circleManager->flagAsAppManaged('tnxgB4xdBpgew6H4l9CJXEUauUNql71');
		$circleManager->stopSession();

  • When marked as AppManaged, the Circle cannot be removed from the OCS API (ie. Contacts App)

  • Allow an App to create its own Entity:

		/** @var CirclesManager $circleManager */
		$circleManager = \OC::$server->get(CirclesManager::class);
		$circleManager->startAppSession('my app', 11010);

		$circle = $circleManager->createCircle(
			'Test Circle',
			$circleManager->getLocalFederatedUser('test1')
		);

identifying as an App does not give more rights. To have rights over a Circle, the Entity of the App needs to be member/moderator/admin of the targetted Circle.

  • Also cleaning some bitwise operations.

@ArtificialOwl ArtificialOwl force-pushed the enh/noid/cfg-app branch 3 times, most recently from 0241ff1 to 1cebfde Compare March 29, 2022 12:35
@ArtificialOwl ArtificialOwl requested a review from mejo- March 29, 2022 12:36
@ArtificialOwl ArtificialOwl marked this pull request as ready for review March 29, 2022 12:36
@ArtificialOwl ArtificialOwl force-pushed the enh/noid/cfg-app branch 2 times, most recently from 7f1cf4d to 5b1ab03 Compare March 29, 2022 19:56
Copy link
Member

@mejo- mejo- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't test it yet, but codewise it looks well done 👍

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
@ArtificialOwl
Copy link
Member Author

/backport to stable23

@ArtificialOwl
Copy link
Member Author

/backport to stable22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants