Commits

Miks Kalniņš committed 34c3167 Merge

Merged.

  • Participants
  • Parent commits 502692a, ea19b98

Comments (0)

Files changed (3)

File MoinMoin/apps/admin/_tests/test_admin.py

                 assert item in rv.data
 
     def test_index(self):
-        self._test_view_get(url_for('admin.index'))
+        self._test_view_get(url_for('admin.index'), status='403 FORBIDDEN')
 
     def test_userprofile(self):
         self._test_view_get(url_for('admin.userprofile', user_name='DoesntExist'), status='403 FORBIDDEN')

File MoinMoin/apps/admin/views.py

 
 
 @admin.route('/userbrowser')
+@require_permission(SUPERUSER)
 def userbrowser():
     """
     User Account Browser
 
 
 @admin.route('/userprofile/<user_name>', methods=['GET', 'POST', ])
+@require_permission(SUPERUSER)
 def userprofile(user_name):
     """
     Set values in user profile
 from MoinMoin.config import default as defaultconfig
 
 @admin.route('/wikiconfig', methods=['GET', ])
+@require_permission(SUPERUSER)
 def wikiconfig():
     settings = {}
     for groupname in defaultconfig.options:
 
 
 @admin.route('/wikiconfighelp', methods=['GET', ])
+@require_permission(SUPERUSER)
 def wikiconfighelp():
     def format_default(default):
         if isinstance(default, defaultconfig.DefaultExpression):

File MoinMoin/themes/foobar/templates/layout.html

         {%- endif %}
         <span id="moin-pagelocation">
             <span class="moin-pagepath">
+            {% block pagepath %}
                 {% for segment_name, segment_path, exists in theme_supp.location_breadcrumbs(item_name) -%}
                     {% if not loop.last -%}
                         <a href="{{ url_for('frontend.show_item', item_name=segment_path) }}" {% if not exists %}class="moin-nonexistent"{% endif %}>
                             {{ segment_name|shorten_item_name }}
                         </a>
-			<span class="sep">/</span>
+                        <span class="sep">/</span>
                     {% else %}
-		        {% if title_name %}
+                        {% if title_name %}
                             {{ title_name }}
                         {% else %}
                         <a href="{{ url_for('frontend.show_item', item_name=segment_path) }}" {% if not exists %}class="moin-nonexistent"{% endif %}>
                             {{ segment_name|shorten_item_name }}
                         </a>
-		        {%- endif %}
+                        {%- endif %}
                     {%- endif %}
                 {%- endfor %}
+            {% endblock %}
             </span>
         </span>
     </div>