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

Remove hierarchy system & add permissions system #730

Merged
merged 152 commits into from Mar 12, 2019

Conversation

Projects
None yet
3 participants
@T-Dnzt
Copy link
Member

commented Jan 24, 2019

Issue/Task Number: #728
Closes #728
Closes #824

Overview

This PR removes the hierarchy system, preferring a flat and explicit structure instead.

Changes

  • Remove the parenting system for accounts (no more parental control)
  • Move the master logic to a setting that can easily be changed

@ghost ghost assigned T-Dnzt Jan 24, 2019

@ghost ghost added the s2/wip 🚧 label Jan 24, 2019

@T-Dnzt T-Dnzt added this to the v1.2 milestone Jan 24, 2019

@T-Dnzt T-Dnzt changed the title Remove hierarchy from ewallet_db Remove hierarchy system Jan 24, 2019

@T-Dnzt T-Dnzt changed the title Remove hierarchy system Remove hierarchy system & add permissions system Feb 4, 2019

@unnawut
Copy link
Collaborator

left a comment

Wow this is a significant PR. Kudos for completing this! 🎖

@unnawut

unnawut approved these changes Mar 7, 2019

mederic-p and others added some commits Mar 8, 2019

@T-Dnzt T-Dnzt requested review from mederic-p and unnawut Mar 8, 2019

@unnawut
Copy link
Collaborator

left a comment

Amazing job on the migration 👏

Repo.update_all(update_query, [])
end

defp add_memberships_for_all_children_accounts(master_uuid) do

This comment has been minimized.

Copy link
@unnawut

unnawut Mar 11, 2019

Collaborator

👍

where: s.key == "master_account"))
case data["value"] do
nil ->
Repo.one(from a in "account", select: [a.uuid, a.id], order_by: [asc: a.inserted_at], limit: 1)

This comment has been minimized.

Copy link
@unnawut

unnawut Mar 11, 2019

Collaborator

Noted that this will assume the first inserted account becomes master account if it cannot be found in the settings.

This was referenced Mar 11, 2019

@T-Dnzt T-Dnzt merged commit 39c17e7 into v1.2 Mar 12, 2019

4 of 5 checks passed

ci/circleci: dialyze Your tests failed on CircleCI
Details
ci/circleci: build_test Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: report Your tests passed on CircleCI!
Details
ci/circleci: test Your tests passed on CircleCI!
Details

@ghost ghost removed the s3/review 👀 label Mar 12, 2019

ripzery added a commit that referenced this pull request Mar 13, 2019

@T-Dnzt T-Dnzt deleted the 728-remove-hierarchy branch Mar 13, 2019

ripzery added a commit that referenced this pull request Mar 16, 2019

ripzery added a commit that referenced this pull request Mar 19, 2019

Add `wallet.all_balances` endpoint (#822)
*  Introduce super incredibly dirty `wallet.all_balances`

*  Add `balance_controller` tests

* 🔨 Fix lint

* 🔨 Refactor chain of tokens passing

* 🔨 Refactor `balance_fetcher.ex`

* 🔥 Removed unused file

* 🔨 Reorder object keys

*  Add test when request missing `address`

*  Add test for `balance_serializer`

* 🔨 Add `moduledoc` for `balance_controller`

*  Add test for `balance_fetcher`

*  Add test in `wallet_test`

* 🔨 Rename endpoint from `wallet.all_balances` to `wallet.get_balances`

* 📝 Update swagger

* 📝 Pluralize

* 🔨 Ignore intellij idea config

* 🔨 Add balance_loader_test

*  Add test for `cache_balance`

* 🔨 Refactor `process_response` in `balance_fetcher`

* 🔨 Remove unused `_type` in `process_response`

* 🔨 Regenerated `spec.json` and `spec.yaml`

* 🔨 Group `add_balances/1`

* 🔨 Use new permission system #730

* 🔨 Use `:view_balance` instead `:get` for authorize

* 🔨 Add more precise description on swagger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.