[guadec-web-regcfp: 26/26] Remove hacked raffle system
- From: Patrick Uiterwijk <puiterwijk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [guadec-web-regcfp: 26/26] Remove hacked raffle system
- Date: Thu, 8 Oct 2015 20:39:02 +0000 (UTC)
commit b445dabeb596e50a9e76dc7ff0e6024e51cde82b
Author: Patrick Uiterwijk <puiterwijk redhat com>
Date: Thu Oct 8 22:33:16 2015 +0200
Remove hacked raffle system
models/user.js | 1 -
routes/index.js | 21 ---------------------
views/index/index.hbs | 4 ----
views/index/view_user.hbs | 11 -----------
4 files changed, 0 insertions(+), 37 deletions(-)
---
diff --git a/models/user.js b/models/user.js
index 8bb9006..583b79b 100644
--- a/models/user.js
+++ b/models/user.js
@@ -4,7 +4,6 @@ module.exports = function(sequelize, DataTypes) {
var User = sequelize.define("User", {
email: DataTypes.STRING,
name: DataTypes.STRING,
- isInelligbileForRaffle: DataTypes.BOOLEAN,
isVolunteer: DataTypes.BOOLEAN
}, {
classMethods: {
diff --git a/routes/index.js b/routes/index.js
index 6c3ed48..fa6624f 100644
--- a/routes/index.js
+++ b/routes/index.js
@@ -48,25 +48,4 @@ function shuffle(array) {
return array;
}
-router.all('/view_name', utils.require_permission('registration/view_name'));
-router.get('/view_name', function(req, res, next) {
- var everyone = req.query.everyone;
- User.findAll({include: [Registration]})
- .then(function(users) {
- var users2 = [];
- for(var user in users) {
- user = users[user];
- if(user.Registration && user.Registration.badge_printed && !user.isInelligbileForRaffle && (everyone
|| user.isVolunteer)) {
- users2.push(user);
- }
- };
- shuffle(users2);
- var name = null;
- if(req.query.index) {
- name = users2[req.query.index].name;
- }
- res.render('index/view_user', { count: users2.length, name: name, everyone: everyone });
- });
-});
-
module.exports = router;
diff --git a/views/index/index.hbs b/views/index/index.hbs
index 4db9460..92ee11f 100644
--- a/views/index/index.hbs
+++ b/views/index/index.hbs
@@ -10,10 +10,6 @@ You can log in with your Persona Account or with a persona provider, for example
Welcome, {{name}}<br />
-{{#has_permission "registration/view_name"}}
-<a href="/view_name">view name</a><br />
-{{/has_permission}}
-
{{#has_permission "registration/desk"}}
<div class="button"><a href="/desk">Desk</a></div>
{{/has_permission}}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]