-
Notifications
You must be signed in to change notification settings - Fork 79
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor dao acl - #858 task #864
Conversation
a9dfaf4
to
d9ab851
Compare
Hey. I was mentioned above but this project does not remind me of anything. Did I make a suggestion a long time ago that is now being considered or was the wrong person added in the description? Cheers. |
Hi @mcormier sorry about that we have a team mate with a similar GitHub username |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 馃檶
@macor161 can you double check the typedef files before we merge it.
I'll create an issue to track the abstraction options for the execHandler
d9ab851
to
c7e183a
Compare
Codecov Report
@@ Coverage Diff @@
## develop #864 +/- ##
==========================================
+ Coverage 7.13% 7.83% +0.69%
==========================================
Files 89 91 +2
Lines 2423 2425 +2
==========================================
+ Hits 173 190 +17
+ Misses 2250 2235 -15
Continue to review full report at Codecov.
|
@0xGabi In reference to all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a small comments and suggest a little change to prevent an error when module
is empty
packages/aragon-cli/src/commands/dao_cmds/acl_cmds/utils/knownRoles.js
Outdated
Show resolved
Hide resolved
Co-Authored-By: Gabriel Garcia <gabrielpk.18@gmail.com>
e4fab51
to
3ee5fdd
Compare
* @property {string[]} allowedEntities | ||
* @property {string} manager | ||
* | ||
* ACL structure sample: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dapplion is this ACL structure sample complete?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Until the PermissionsData
level, I think so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After doing other review I consider this is ready to be merged. There are a few cosmetic changes that we can discuss on next sync.
We discuss with Mathew to merge the PR first and then he'll take a look.
馃 Pull Request
Subtask of #858. Separate the logic from the CLI front-end and test the logic part.
acl view:
Split the logic into three files / parts
lib/acl/view
: Fetches the data and interfaces witharagon-js
lib/acl/viewFormatter
: Parses the data and returns the data relevant to the user appended with human names. This component is fully testedcommands/dao/acl/view
(original): Call data fetcher, call parser, and then print the data in as a table with emojis on other stringified content.Also, every used function is now typed with JSDoc, and the typings abstracted to
typedef.js
. I have seen that @macor161 also uses JSDoc on new code, can we create general type definitions for reused that structures such amodule
,network
etc?others:
All other
dao acl
commands just called the wrapperexecHandler
and since they do just one single asynchronous task there is no intermediate logging. If its logic was moved out to alib/**/*
file I'm not sure if it would just be code duplication. After further review, there are too many dependencies of these utils, so I can't safely refactor them at the moment. I would recommend considering the exclusiveacl
commands refactored and tackle thedao
utils refactors latter.馃毃 Test instructions
Run
aragon dao acl
commands against your DAO鉁旓笍 PR Todo