Conditionally removing the "configure" editor (#16778)
Note, I'm not overly keen on writing permission tests for this component. Why? Robust permissioning tests can create combinatorial explosions. And there are presently no Rspec request specs for this. So to add an automated test, we'd need to add a set of seed data that seeds data that conforms to the emerging business logic of the policy. And while this is easy with use case 1-1, it gets harder as we move into more nuanced use cases. Instead we should rely on bombarding our policy classes with lots of tests to let them demonstrate what we mean when we say `if p.olicy(Article).create?` Note, there is a potential relation to forem/forem#14807, namely if we add a rich text editor to our comments, we may need to explore the purpose and intention of this setting. Closes forem/forem#16516
This commit is contained in:
parent
4d612ed525
commit
1d7436702f
1 changed files with 2 additions and 0 deletions
|
|
@ -40,6 +40,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<% if policy(Article).create? %>
|
||||
<div class="crayons-card crayons-card--content-rows">
|
||||
<h2 class="crayons-subtitle-1">
|
||||
<%= t("views.settings.custom.writing") %>
|
||||
|
|
@ -53,6 +54,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="crayons-card crayons-card--content-rows">
|
||||
<h2 class="crayons-subtitle-1">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue