Skip to content

Commit

Permalink
Disable marking of unauthorized releases for now
Browse files Browse the repository at this point in the history
Until we improve the accuracy of the indexer
and are more confident in the logic.

Leave it as a feature flag so that we can toggle it on/off for testing.
Maybe we'll re-enable it someday, maybe we won't.

refs #706, #1117, #1164, #1200.
  • Loading branch information
rwstauner committed May 21, 2014
1 parent 4b22fbf commit 57e1bbe
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
8 changes: 8 additions & 0 deletions lib/MetaCPAN/Web/Controller/Release.pm
Expand Up @@ -113,6 +113,14 @@ sub view : Private {
root => \@root_files,
examples => \@examples,
files => \@view_files,

# TODO: Put this in a more general place.
# Maybe make a hash for feature flags?
(
map { ( $_ => $c->config->{$_} ) }
qw( mark_unauthorized_releases )
),

( $changes ? ( last_version_changes => $changes ) : () )

);
Expand Down
2 changes: 2 additions & 0 deletions metacpan_web.conf
Expand Up @@ -10,6 +10,8 @@ api_external_secure = https://api.metacpan.org
consumer_key = metacpan.dev
consumer_secret = ClearAirTurbulence

mark_unauthorized_releases = 0

<view HTML>
INCLUDE_PATH root/
TAG_STYLE asp
Expand Down
6 changes: 3 additions & 3 deletions root/inc/breadcrumbs.html
Expand Up @@ -8,7 +8,7 @@
<option <% selected %> value="/<% [(module ? 'module' : 'release'), version.author, version.name, module.path].join('/') %>">
<% version.version _ (version.maturity == 'developer' ? ' DEV' : '') %>
(<%version.author %> on <% version.date.dt_date_common %>)
<% IF NOT version.authorized %>UNAUTHORIZED<% END %>
<% IF mark_unauthorized_releases && NOT version.authorized %>UNAUTHORIZED<% END %>
</option>
<%- END;
FOREACH version IN versions;
Expand All @@ -34,15 +34,15 @@
<%- END %>
<a rel="author" itemprop="author" itemscope itemtype="http://schema.org/Person" href="/author/<% IF module; module.author; ELSE; release.author; END %>" title="<% author.asciiname %>"><% author.name %></a>
<span>&nbsp;/&nbsp;</span>
<div class="release status-<% release.status %> maturity-<% release.maturity %><% IF NOT release.authorized %> unauthorized<% END %>">
<div class="release status-<% release.status %> maturity-<% release.maturity %><% IF mark_unauthorized_releases && NOT release.authorized %> unauthorized<% END %>">
<span class="dropdown"><b class="caret"></b></span>
<select class="<% module ? "" : "extend" %>" onchange="document.location.href=this.value"><% PROCESS version_dropdown %></select>
<% IF module %>
<a class="release-name" itemprop="name" href="/release/<% IF release.status == 'latest'; release.distribution; ELSE; [module.author, module.release].join('/'); END %>"><% release.name %></a>
<% ELSE %>
<span class="release-name"><% release.name %></span>
<% END %>
<% IF NOT release.authorized %><em class="warning">UNAUTHORIZED RELEASE</em><% END %>
<% IF mark_unauthorized_releases && NOT release.authorized %><em class="warning">UNAUTHORIZED RELEASE</em><% END %>
</div>
<div class="inline"><%- INCLUDE inc/favorite.html module = module || release %></div>
<%- IF module %>
Expand Down

0 comments on commit 57e1bbe

Please sign in to comment.