Skip to content

Commit

Permalink
Merge branch 'master' into issue171
Browse files Browse the repository at this point in the history
Conflicts:
	app/models/User.php
	composer.json
  • Loading branch information
coogle committed Apr 7, 2014
2 parents bd99a38 + f275e44 commit 877e7cd
Show file tree
Hide file tree
Showing 10 changed files with 175 additions and 218 deletions.
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
VagrantConfig.json
bootstrap/compiled.php
public/.sass-cache/
public/js/uservoice.js
public/js/addthis.js
public/js/ga.js
public/.sass-cache/*
public/private/*
app/config/creds.yml
app/config/smtp.yml
app/config/remote.php
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class DashboardController extends BaseController{
public $restful = true;

public function __construct(){
//Filter to ensure user is signed in and is user_level == 1
//Filter to ensure user is signed in has an admin role
$this->beforeFilter('admin');

//Run csrf filter before all posts
Expand Down
61 changes: 0 additions & 61 deletions app/controllers/DevController.php

This file was deleted.

3 changes: 2 additions & 1 deletion app/controllers/UserApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public function postVerify(){
public function getAdmins(){
$this->beforeFilter('admin');

$admins = User::where('user_level', 1)->get();
$adminRole = Role::where('name', 'Admin')->first();
$admins = $adminRole->users()->get();

foreach($admins as $admin){
$admin->admin_contact();
Expand Down
3 changes: 1 addition & 2 deletions app/models/Annotation.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ public function toAnnotatorArray($userId = null)
'updated' => $comment->updated_at->toRFC2822String(),
'user' => array(
'id' => $user->id,
'user_level' => $user->user_level,
'email' => $user->email,
'name' => "{$user->fname} {$user->lname[0]}"
)
Expand All @@ -256,7 +255,7 @@ public function toAnnotatorArray($userId = null)
}

$user = User::where('id', '=', $item['user_id'])->first();
$item['user'] = array_intersect_key($user->toArray(), array_flip(array('id', 'email', 'user_level')));
$item['user'] = array_intersect_key($user->toArray(), array_flip(array('id', 'email')));
$item['user']['name'] = $user->fname . ' ' . $user->lname{0};

$item['consumer'] = static::ANNOTATION_CONSUMER;
Expand Down
2 changes: 0 additions & 2 deletions app/views/doc/reader/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
var user = {
id: {{ Auth::user()->id }},
email: '{{ Auth::user()->email }}',
user_level: {{ Auth::user()->user_level }},
name: '{{ Auth::user()->fname . ' ' . substr(Auth::user()->lname, 0, 1) }}'
};
</script>
Expand All @@ -14,7 +13,6 @@
var user = {
id: '',
email: '',
user_level: '',
name: ''
}
</script>
Expand Down
5 changes: 4 additions & 1 deletion app/views/layouts/main.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html ng-app="madisonApp" lang="en">
<html id="ng-app" ng-app="madisonApp" lang="en">
<head>
<meta charset="utf-8" />
<title>{{ $page_title }}</title>
Expand All @@ -13,6 +13,9 @@
@include('layouts.assets')
</head>
<body>
<!--[if lt IE 8]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/" target="_blank">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div id="wrap" class="wrap">
<div id="header-main" class="header row">
<div class="container">
Expand Down
4 changes: 2 additions & 2 deletions composer.json
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"way/phpunit-wrappers": "dev-master"
},
"require": {
"anahkiasen/rocketeer": "dev-master",
"zizaco/entrust" : "dev-master",
"anahkiasen/rocketeer": "dev-master",
"laravel/framework": "4.1.*",
"roumen/sitemap": "dev-master",
"elasticsearch/elasticsearch": "~0.4",
"illuminate/remote": "4.1.*",
"graham-campbell/markdown": "1.0.*",
"graham-campbell/markdown": "1.0.0",
"doctrine/dbal" : "2.3.*"
},
"autoload": {
Expand Down
Loading

0 comments on commit 877e7cd

Please sign in to comment.