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

[#23] Update develop #25

Closed
wants to merge 41 commits into from
Closed

[#23] Update develop #25

wants to merge 41 commits into from

Conversation

roberlander2
Copy link
Collaborator

@roberlander2 roberlander2 commented Feb 16, 2024

Description

This PR merges changes from rokwire/develop.

Resolves #23

Review Time Estimate

Please give your idea of how soon this pull request needs to be reviewed by selecting one of the options below. This can be based on the criticality of the issue at hand and/or other relevant factors.

  • Immediately
  • Within a week
  • When possible

Type of changes

Please select a relevant option:

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Other (any another change that does not fall in one of the above categories.)

Checklist:

Please select all applicable options:

  • I have signed the Rokwire Contributor License Agreement (CLA). (Any contributor who is not an employee of the University of Illinois whose official duties include contributing to the Rokwire software, or who is not paid by the Rokwire project, needs to sign the CLA before their contribution can be accepted.)
  • I have updated the CHANGELOG.
  • I have read the Contributor Guidelines.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My change requires updating the documentation.
  • I have made necessary changes to the documentation.
  • I have added tests related to my changes.
  • My changes generate no new warnings.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

petyos and others added 14 commits December 1, 2023 09:23
* Update CHANGELOG.md

* Define accounts identifies collection

* Define account identity - in progress

* Define properties

* Add indexes

* Update CHANGELOG.md

* Change to tenants accounts

* Update structs

* Update indexes

* Migrate data - in progress

* Use transaction

* Verify that the transaction works

* Prepare complex query

* Show only the repeatable ones

* Process duplicate accounts - in progress

* Remove commented code

* Work with struct

* Organise code

* Prepare founded items

* Prepare founded items - in progress

* Load all accounts

* Load the accounts prevent missing any fields

* Get full accounts objects

* Get full accounts objects - part 2

* Construct tenants accounts

* Segment by org - in progress

* We need to load the apps orgs object from the database as we will need them

* Segment by org - in progress

* Segment by org

* Print data

* Simplify structure data - in progress

* Simplify structure data - in progress

* Simplify structure data

* Construct tenant accounts for org - in progress

* Construct tenant accounts for org - in progress

* Add env variable flag

* Construct tenant accounts - in progress

* Fix error

* Construct tenant account from account

* Construct tenant accounts - in progress

* Check if contains identity

* Create tenant accounts

* Verify that do not repeate

* Add account to tenant account

* Replace item

* Add only the auth types which are not already in the mixed tenant account

* Merge memberships - in progress

* Merge memberships - in progress

* More stuff

* Mix tenant accounts

* More stuff

* Insert tenant accounts

* Mark accounts as processed

* Iterate only not migrated records

* Check if need to apply processing

* Prepare oepration for huge data - in progress

* Work on the query

* Work on query

* Work on the query

* Work on the query..

* Query is in progress

* Introduce two phases

* Use $merge instead of $out

* Process by org

* Process for every organization

* More stuff

* Add appropriate comments

* Set appropriate log

* Start the migration before the watch threads

* Set long timeout

* Disable storing system data

* Sleep for 1 second

* Remove shared identities from the docs

* Generate gen_types with the latest tool version

* Remove shared profile

* Remove shared identities

* Account to profile is one to one relation

* Update model - in progress

* Update model

* Start using tenant accounts collection step by step

* Use app org id from the params

* Mark storage functions as deprecated

* Define accountFromStorage for tenant account type

* Tenant accounts in progress

* Optimise code

* Work with memberships - in progress

* Do not use pointer

* Construct memberships

* Set current membership

* Register account - in progress

* Construct account

* Mark function as deprecated

* Insert account

* Use tenants accounts

* Use tenants..

* More readable code

* We must handle accounts on org level

* Check if it is "sign-in" or "org-sign-up" or "app-sign-up" - in progress

* Handle different operation - in progress

* app-sign-up operation is not supported

* Set current app org id

* External auth - in progress

* Various fixes

* Use tenant accounts

* Fix credential when external

* More APIs - in progress

* More APIs - in progress

* More APIs - in progress

* Fix update profile API

* Fix update privacy API

* Fix get preferences API

* Update preferences is in progress

* Fix update preferences

* Disable this for now

* Fix mocks

* Anonymous accounts - in progress

* Use v2 function

* Create anonymous account

* Fix get system configs API

* Fix update username API

* Fix add follow API

* Fix get mfa types API

* Fix get public accounts API

* Fix get public accounts API - part 2

* Fix find accounts API - in progress

* Fix find accounts API - in progress

* Fix find accounts API

* Disable for now

* Fix update account permission

* Fix update account roles

* Fix update account groups

* Revert comment

* Fix mfa types

* Fix delete mfa type

* Fix scopes

* Fix refresh tokens API

* Fix can sign in API

* Use tenants accounts

* Use tenants accounts

* Link issues

* Link issues - part 2

* Link issues - part 3

* Fix get account

* Use tenants accounts

* Use tenants accounts

* Fix system configs

* Fix system configs - part 2

* Use tenants accounts

* Fix search params

* Fix counts API.

* Groups in progress

* Add accounts to group

* Remove accounts from group

* Fix create group

* Fix update group

* Use tenant accoutns

* Fix devices

* in progress

* Use account v2

* Fix grant permissions to account

* in progress

* Fix revoke permissions

* Fix grant roles

* Fix revoke roles

* Use tenants accounts

* More issues

* set "code"

* Fix mocks

* secrets

* Fix groups

* Not used and also no more relevant as one account has a profile

* docs

* in progress

* secrets

* add Apps to the docs in the PartialAccount

* add Apps to the conversion

* secrets

* change Apps to App

* update gen version

* Do not make changes in go.mod and go.sum

* Use v1.16.2 tool

* Fix broken files - remove the two files with the same names - part 1

* Fix broken files - part 2

* Fix broken files - part 3 arh..

* Fix broken files - part 4

* Fix other broken files - part 1

* Fix other broken files - part 2

* Regenerate

* App is renamed to PartialApp

* Account has apps but not app

* add Apps do docs

* add apps in the structure

* add apps to DeleteAccount

* Fix build

* API in progress

* API in progress

* API in progress

* Prepare API

* Delete Membership

* secrets

* fix

* fix comments

* fix

* secrets

* fix

* secrets

* Give better name

* Fix lint issue

* Fix more lint issues

* Disable verified as not used

* Remove unused deprecated functions

* Fix verified

* Verified is omitempty

---------

Co-authored-by: Petyo Stoyanov <[email protected]>
Co-authored-by: Stefan Vitanov <[email protected]>
* check if collection exists - functionality in progress

* create auth type collection function

* set the Changelog.md

* fix lint issues

* set the mocks

* resolve comments

---------

Co-authored-by: Stefan Vitanov <[email protected]>
* Update CHANGELOG.md

* Fix is in progress

* Do not pass parameter which is not used

* Check if the account exists for this app

* Determine operation

* App sign up is in progress

* App sign up is in progress

* Return account

* Once we have tenants accounts this means that phone is also valid

* In progress

* API is done

---------

Co-authored-by: Petyo Stoyanov <[email protected]>
* Update CHANGELOG.md

* Split in separate function

* In progress

* Reuse function

* Process by pieces

* Revert test code

---------

Co-authored-by: Petyo Stoyanov <[email protected]>
* Update CHANGELOG.md

* User orgs_accounts

* Use migrated 2

* We care only org account

* External user could be nil for some reasons, prevent nil pointer

---------

Co-authored-by: Petyo Stoyanov <[email protected]>
* Update CHANGELOG.md

* Fix nil pointer

* Update CHANGELOG.md

---------

Co-authored-by: Petyo Stoyanov <[email protected]>
@roberlander2 roberlander2 self-assigned this Feb 16, 2024
@roberlander2 roberlander2 mentioned this pull request Feb 16, 2024
18 tasks
roberlander2 and others added 12 commits February 16, 2024 17:09
* Update CHANGELOG.md

* Remove migration

* Remove more stuff

---------

Co-authored-by: Petyo Stoyanov <[email protected]>
* convert string into slice and set the docs

* fix the docs

* set the Changelog.md

* fix

* Generate docs

---------

Co-authored-by: Stefan Vitanov <[email protected]>
Co-authored-by: Petyo Stoyanov <[email protected]>
…se identifiers in account search API examples
* add Changelog.md

* Define the new API in the adapter

* Docs in progress

* Mark the old one as deprecated

* Docs are done

* creating the struct and the object for the porpose of the  API

* structure

* in progress

* add permission to authorisation policy

* secrets

* fix the name and the Changelog

* fix the function name

* fix the comments of the CreateAccounts function

* change the name of the struct

* at the transaction for the whole function

* one transaction for all operations

* secrets

* fix lint issue

* secrets

* fix

---------

Co-authored-by: Stefan Vitanov <[email protected]>
Co-authored-by: Petyo Stoyanov <[email protected]>
@roberlander2
Copy link
Collaborator Author

Removed auth type/identifier migration (already completed in ROKMETRO databases) and moved to #26.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TASK] Merge changes from Rokwire
3 participants