-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
[WIP] Change Access Control verification #80
Conversation
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.
Create a middlewares package to put all the middleware, today we have the middleware package cmd (doesn't make sense)
66a2dd0
to
953ad06
Compare
Current coverage is 86.49% (diff: 100%)@@ master #80 diff @@
==========================================
Files 6 6
Lines 753 733 -20
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 650 634 -16
+ Misses 68 65 -3
+ Partials 35 34 -1
|
@@ -1,4 +1,4 @@ | |||
package cmd | |||
package middlewares |
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.
I don't think it's necessary to put the package name as a prefix middlewares_utils
, used utils
example. The name utils is not very good, we need to think of another name.
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.
I agree, middlewares_utils.go
isn't good name, but utils.go
makes sense
next(rw, rq) | ||
return | ||
} | ||
|
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.
Why break two lines? Run gofmt
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.
No rules to this, gofmt
do nothing 🤔
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.
@marioidival https://play.golang.org/p/UbeaD8IQwe
click in Format
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.
sorry, not exist two line, my eyes must have confused
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.
👍
thank you @marioidival |
* Create utils to middleware * Remove old permission verifications * Create middleware to AccessControl * Remove old permission verification in tables.go * Create package middleware * Change name of middlewares utils file
* Create utils to middleware * Remove old permission verifications * Create middleware to AccessControl * Remove old permission verification in tables.go * Create package middleware * Change name of middlewares utils file
* Create utils to middleware * Remove old permission verifications * Create middleware to AccessControl * Remove old permission verification in tables.go * Create package middleware * Change name of middlewares utils file
* Create utils to middleware * Remove old permission verifications * Create middleware to AccessControl * Remove old permission verification in tables.go * Create package middleware * Change name of middlewares utils file
[WIP] Looking for new way to test it.
In manual test the feature it's ok, but it's cool have test code guarantee.
I NEED HELP
#79, #75, #52