Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Security][SecurityBundle] Add voter individual decisions to profiler#27914
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
javiereguiluz commentedJul 10, 2018
@l-vo this is something we definitely want to improve. Thanks! If possible, please paste a before/after screenshot comparison. |
l-vo commentedJul 10, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I didn't understand what CHANGELOG file I should update ? There is not CHANGELOG.md file and the CHANGELOG-4.1.md not seems to me the good file since I think my PR is for the 4.2 version. |
| $decisionLog =$this->accessDecisionManager->getDecisionLog(); | ||
| // Voter constants | ||
| $reflexionClass =new \ReflectionClass(VoterInterface::class); |
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.
$reflectionClass
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.
@curry684 Fixed, thank you :)
l-vo commentedJul 10, 2018
@javiereguiluz : screenshots added, thanks ! |
src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
51369d7 to59761f6Compare3aa0f2d to3a82646CompareUh oh!
There was an error while loading.Please reload this page.
3a82646 to2175182Comparero0NL commentedJul 13, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I'd like to see the "Show/hide voter details" toggle per row in the initial table (right column), toggling a single new table of voter details underneath it. Yes, there'd be always 1 active table with voter details. Currently it looks cluttered, and unclear which table belongs to what. edit; but wait for@javiereguiluz's opion 😉 |
javiereguiluz commentedJul 13, 2018
@ro0NL that's exactly what I was thinking. It's like the "Show more" link that GitHub uses in some places: My idea was going to wait until this PR was merged and then tweak its design a bit in another PR. I have some sketches ready, but need time to polish it. |
2175182 tob1b73d9Comparel-vo commentedJul 14, 2018
Add PR changes to CHANGELOG files |
l-vo commentedJul 14, 2018
@ro0NL@javiereguiluz ok for doing that in this way, I was not really inspired for how changing the current interface efficiently. |
b1b73d9 tof3157daComparef3157da to6794076Compare
ro0NL left a comment
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.
shouldVoteEvent +VoteListener also marked@internal? Tend to believe at least the event should kept internal.
8a28b3d to42b0de2Comparel-vo commentedOct 19, 2018
l-vo commentedOct 19, 2018
status: needs review |
chalasr commentedOct 28, 2018
Great work so far, but#27914 (comment) is not fully resolved, right? |
l-vo commentedOct 28, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@chalasr It is fully resolved. This problem occured when |
chalasr left a comment
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.
Good for 4.2 IMHO
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
42b0de2 to5af1d0cComparel-vo commentedOct 28, 2018
Fixed some minors things, |
5af1d0c to8abb056Comparefabpot commentedOct 28, 2018
Thank you@l-vo. |
…ons to profiler (l-vo)This PR was merged into the 4.2-dev branch.Discussion----------[Security][SecurityBundle] Add voter individual decisions to profiler| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets || License | MIT| Doc PR |On the profiler (security tab), the decisions made by the AccessDecisionManager are displayed with the voters registered in the application. But there is no information about which voter was really used for each AccessDecisionManager choice and which result the voters returned.This PR allows to display for each AccessDecisionManager choice, the voters implicated and the vote they returned.Screenshot profiler before PR:Screenshot profiler after PR:<img width="1093" alt="capture d ecran 2018-10-10 a 21 35 30" src="https://user-images.githubusercontent.com/15314293/46761807-c16c4a00-ccd5-11e8-85b1-8cc0ea3eb9b8.png">Commits-------8abb056 [Security][SecurityBundle] Add voter individual decisions to profiler
…mata)This PR was merged into the 4.2-dev branch.Discussion----------[SecurityBundle] unhide debug security voter services| Q | A| ------------- | ---| Branch? | master| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| License | MIT#27914 introduces `testThatVotersAreNotDecoratedWithoutDebugMode()` which tests if decorated services exist but uses a bad service name without starting dot.Definition in the compiler pass :https://github.com/symfony/symfony/blob/a4204cd685c02377e6e2fbfc7ece98b5563644d9/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php#L58-L66The expected services are hidden and their name start with a dot. So the test will always pass, now it can fails :)Commits-------4677bb4 [SecurityBundle] unhide debug security voter services

Uh oh!
There was an error while loading.Please reload this page.
On the profiler (security tab), the decisions made by the AccessDecisionManager are displayed with the voters registered in the application. But there is no information about which voter was really used for each AccessDecisionManager choice and which result the voters returned.
This PR allows to display for each AccessDecisionManager choice, the voters implicated and the vote they returned.
Screenshot profiler before PR:


Screenshot profiler after PR: