Skip to content
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

PoC: create and use Circles instead of Groups #1597

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ArtificialOwl
Copy link
Member

This is a quick and simple PoC that replace Groups with Circles.

@ArtificialOwl
Copy link
Member Author

The idea is to use SingleIds of the Circles App to add Group or Circle to the list of recipient.

Right now, only work from the occ command:

This is my list of available Circles:
Selection_047

We will use:

  • aDh4c1kTgeQXnzl1MyKtp2uMRdJCjHI as a normal Circle generated by a user,
  • nfVw7bGzGOyvYsnaotMwDqSYHUVNAiN as a Nextcloud Group (the singleId is generated using occ circles:sync, or waiting for a background job)

Adding Circles to the groupfolder:

 $ ./occ groupfolder:group 2 nfVw7bGzGOyvYsnaotMwDqSYHUVNAiN
 $ ./occ groupfolder:group 2 aDh4c1kTgeQXnzl1MyKtp2uMRdJCjHI

The singleId is stored in the database as it is, and used by the FolderManager

@ArtificialOwl
Copy link
Member Author

ArtificialOwl commented Jul 17, 2021

This is just a quick proof of concept, that will only be available in NC23. Will need last version of Circles from repository (stable22 or master)

Also, lot of work to finalize this work:

  • Implementation in core of an ocs API to allow a search/browse Circles from the front-end (ie. GET /ocs/v1.php/cloud/circles/details)
  • Permissions,
  • Migrations

@skjnldsv skjnldsv added 2. developing Items that are currently under development enhancement labels Aug 10, 2021
Signed-off-by: Maxence Lange <[email protected]>
@ArtificialOwl ArtificialOwl force-pushed the enh/noid/poc-circle-folders branch from 5a9d365 to 316d1db Compare August 20, 2021 12:51
@fschrempf fschrempf marked this pull request as draft November 17, 2021 11:00
@@ -46,7 +53,15 @@ export class Api {

listGroups(): Thenable<Group[]> {
const version = parseInt(OC.config.version, 10);
if (version >= 14) {
if (version >= 22) {
Copy link
Member

Choose a reason for hiding this comment

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

Since this is likely never back ported below 22 we can drop the older code path.


public function __construct(IDBConnection $connection, IUserMappingManager $userMappingManager) {
/**
* @var IEntityMappingManager
Copy link
Member

Choose a reason for hiding this comment

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

Could we find a better naming here instead of entity?

$query->select('folder_id', 'mapping_type', 'mapping_id')
->from('group_folders_manage', 'm');

$queryHelper->addCircleDetails('m', 'mapping_id');
Copy link
Member

Choose a reason for hiding this comment

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

Depending on if circles is then mandatory or if groups can still be used (which I'd vote for), we should have a possible or move anything circles related to a dedicated services to also allow the app to work if circles is disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Items that are currently under development enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants