Anonymous avatar Anonymous committed da21839 Merge

Merged the 0.1 branch.

Comments (0)

Files changed (3)

 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 // POSSIBILITY OF SUCH DAMAGE.
 
-ak.use('ak');
-this.update(ak);
+ak.use('ak', '0.1');
+ak.update(this, ak);
 
 include('__init__.js');
 include('tests.js');
 }
 
 
+function develops(user, appDescr) {
+  return user == appDescr.admin || appDescr.developers.indexOf(user) != -1;
+}
+
+
 var LogHandler = IndexHandler.subclass(
   {
     get: function (request, app, owner, spot) {
       var appDescr = describeApp(app);
-      if (appDescr.developers.indexOf(request.user) == -1)
-        throw new HttpError('You are not a developer of ' + app + ' app',
-                            http.FORBIDDEN);
+      if (!develops(request.user, appDescr))
+        throw Forbidden('You are not a developer of ' + app + ' app');
       owner = (owner || request.get.owner || request.user).replace(/-/g, ' ');
-      if (appDescr.developers.indexOf(owner) == -1)
+      if (!develops(owner, appDescr))
         throw NotFound(owner + ' is not a developer of ' + app + ' app');
       spot = spot || '';
       var places = rv.Place.where({app: app}).get(
     post: function (request, app, owner, spot) {
       var delSpot = request.post.spot || '';
       if (!(delSpot || request.user == describeApp(app).admin))
-        throw HttpError('Forbidden', http.FORBIDDEN);
+        throw Forbidden();
       var place = rv.Place.where(
         {
           app: app,

templates/base.html

-{% extends 'ak:base.html' %}
+{% extends 'ak:0.1/templates/base.html' %}
 
 {% block head %}
   <link rel="stylesheet" href="{% code 'static/main.css' %}" type="text/css">
 {% endblock %}
 
-{% block logo %}
+{% block header %}
   <a href="{% url 'index' %}">
     <img id="logo" alt="Akshell Log" src="{% code 'static/logo.png' %}">
   </a>

templates/error.html

 {% block title %}Error - Akshell Log{% endblock %}
 
 {% block content %}
-  <h1>{{ error.message }}</h1>
+  <h2>{{ error.message }}</h2>
 {% endblock %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.