Code Monkey home page Code Monkey logo

plas's Introduction

PLAS: Pittco LAN Administration System

Administrate your LAN party organization using this handy tool. Accept payments, track users, schedule tournaments, and more.

Authors

Gittip

Contributors

Translators

  • English: Colin Dean

About Pittco

Pittco is the Pittsburgh LAN Coalition. Pittco is a not-for-profit LAN party video gaming organization based in Pittsburgh, Pennsylvania.

Pittsburgh LAN Coalition, Inc. ("Pittco") was founded in 2003 to organize the greater Pittsburgh LAN scene. The mission of Pittco is to provide a safe, entertaining, and competitive environment for video gamers of all ages. Since its inception, Pittco has held thirteen events and has received much attention in the LAN party community. Its web site is www.pittco.org.

Social

We're just using Pittco's existing accounts for announcements regarding PLAS.

Download

PLAS is still in heavy development and not ready for public use.

Hell, it's not ready for our use!

Installation

PLAS requires at least ruby 1.9.2 and rails 3.0.x. Target release is ruby 1.9.3 or ruby 2.0.0, whichever comes first.

Use

Create a user to be able to do anything. Go to /god_mode as your freshly created user in order to put that user into the Application Administrators group. Don't worry, that URL will only work when there are no members in that group.

In order to use PayPal, you must get your PayPal account's login, password, and signature from the API console, and then set three Pfcgs:

  • paypal.login
  • paypal.password
  • paypal.signature

I'd entertain a patch/pull with these prepopulated, as well as a better way to edit Pcfg (I'd like it to be kinda like Firefox's about:config). For now, go to http://localhost:3000/pcfgs to set pcfg variables.

To use tournaments, you need a Challonge account and the API key from it. Set the challonge.api.username Pcfg to your username and set challonge.api.key to the key. These Pcfgs are created at bootstrap time.

Contributing

We use GitHub for our primary repository, but admittedly have a private repo on Dropbox which is really just a backup of GitHub.

We develop on ruby 1.9.2 and rails 3.0.x. See the Gemfile for other stuff we require. We do provide an .rvmrc for rvm users (seriously makes life so much easier).

Assuming you already have git, any ruby, and rvm installed, do these:

git clone https://github.com/colindean/plas.git
cd plas
gem install bundler
bundle install

That should make your environment kosher. You should create the gemset anyhow.

One developer reported an issue because iconv wasn't available on his installation of OSX 10.6. If you encounter that, read How to fix the iconv require error in Ruby 1.9.

For more in-depth contributing instructions, including instructions for folks who want to be fully-fledged contributors to the project, see doc/CONTRIBUTING.mkd.

In order to interact with PayPal, setup a PayPal sandbox account and get the API information. config/environments/{development,testing}.rb set the gateway to test mode, so you won't have to do that manually.

Internationalization/Localization (i18n/l10n)###

Please use gettext syntax when hardcoding strings anywhere in the application. For now, we're using po/mo file storage, but we may eventually move to database-backed translations if more roll in.

We plan to support any languages for which a translation is contributed. If you would like to contribute a translation, please contact colindean.

Testing

What we really need are tests. Colin has not been a good Rubyist and done proper test-driven development due to the time crunch.

Please write tests where possible. We're using MiniTest for tests, what few there are. billturner is in charge of the testing harness for now, so questions about it should be directed at him. If you alter any of the harness files (.watchr, etc.) and include stuff for developing PLAS on Windows, please ensure that your changes still work on OSX and Ubuntu before submitting a pull request.

Browser Compatibility

We only care about these browsers, current release and one major release back:

  • Firefox
  • Chrome
  • Opera

Nice to have Safari working, too, but it's lower priority. I'd also like to keep it small-screen friendly for mobile and netbook browsers, so please keep that in mind when adding anything which has significant width (minimize horizontal scrolling as much as possible.

I do not plan to support Internet Explorer at all. If it works, it works. If someone is adamant about Internet Explorer support, then they are welcome to submit pull requests.

Accessibility (a10y)

As there is an assumption in the gaming community that users are sighted, we won't concern ourselves with screen readers and such. However, we do recognize colorblindness and will endeavor to ensure that colorblind users are able to use PLAS.

As of yet, none of the developers are colorblind and few have experience with colorblind-friendly interface design. We welcome pull requests, issues, and advice.

If there's an issue preventing you from using PLAS because of a disability, please file an issue.

Licensing

PLAS is released under the terms of the GNU Affero General Public License. See LICENSE.mkd for the short license or (http://www.gnu.org/licenses/agpl.txt) for the full license text.

To summarize the AGPL, it's essentially the GPLv3 plus a clause which requires that folks who enable use of the software via a network, e.g. the Internet, must provide source upon request.

In short, if you modify PLAS for your organization, you must make available your source to anyone who uses your modified version. This is in hopes that customizations done to PLAS will find their way back into upstream sooner than later!

History lesson. Pittco formerly used Autonomous LAN Party (ALP) for its management needs. ALP was licensed under the Qt Public License. This prevented Pittco from releasing its modifications to ALP as anything other than a patch. This was annoying and, ultimately, no other organization ever benefited from Pittco's enhancements to ALP for security, payment processing, new themes, and more.

plas's People

Contributors

colindean avatar billturner avatar binarycleric avatar arielkirkwood avatar

Stargazers

Brendan O'Brien avatar Angus H. avatar em dan trim avatar  avatar Daniel Motles avatar  avatar  avatar Carol (Nichols || Goulding) avatar Scott Werner avatar JB Hewitt avatar Gerardo Lisboa avatar Daniel Lamando avatar Nathaniel Sabanski avatar  avatar

Watchers

 avatar  avatar  avatar James Cloos avatar  avatar

plas's Issues

Store payment transaction data

We need to store transaction data for

  1. PayPal
  2. Checks we receive for mailed payments
    • name
    • address on check
    • bank drawn on
    • check number
    • amount
    • date on check
    • memo
    • signer's name if legible
    • who entered by (current_user)
  3. Walk-in payments
    • amount
    • who entered by (current_user)

Shoutbox System

Require features in initial implementation:

  1. Admin permissions to moderate (delete posts, ban users, no editing)
  2. Automatically linkify links

Nice to have features, may be filed as Enhancements if not in initial implementation:

  1. Profanity filter (really, just a filter) - Must be configurable and have "good defaults"
  2. URL shortening for links using bit.ly or some locally-hostable product - Mad props for implementing shortening in PLAS
  3. Upvote/downvote or agree/disagree buttons (anonymous)
  4. Markdown syntax accepted

This would be a great project for someone just getting their feet wet in Rails.

Tech Support system

Allow registered users to file tech support tickets. These are simple requests and need only be seen by users who are a part of the tech support group. Provide for a subject, description, source (hardware/software/don't know) and severity/priority.

It might be another useful feature to have some way to allow users to join this group themselves.

Severities/Priorities:

Critical (I can't play in an official tournament)
High (I can't play in an unofficial tournament)
Medium (I can't play a game I want to play)
Low (I don't know how to do something)
Trivial (I have a question)

Groups:

Tech Support Admins
Tech Support Users

Permissions:

support.open
support.close
support.administrate
support.view

EAR vulnerability - need a return after redirect_to

Received this today:


Hi colindean,

I found a potential bug in your GitHub project, https://github.com/colindean/plas/

I'm a PhD student in computer security of the University of California, Santa Barbara, and I'm researching Execution After Redirect (more information here: http://adamdoupe.com/overview-of-execution-after-redirect-web-appl) vulnerabilities. I created a tool to analyze Ruby on Rails applications for EAR vulnerabilities and it found EARs in your project plas.

Here's the output from the tool:

Regular EAR found in ./app/controllers/registrations_controller.rb:82.
With the call graph: redirect_to
Severe EAR found in ./app/controllers/registrations_controller.rb:105.
With the call graph: redirect_to
Severe because of ./app/controllers/registrations_controller.rb:137.
Severe EAR found in ./app/controllers/users_controller.rb:81.
With the call graph: redirect_to
Severe because of ./app/controllers/users_controller.rb:85.
Regular EAR found in ./app/controllers/users_controller.rb:102.
With the call graph: redirect_to

Quick EAR overview:
Calling redirect_to doesn't end execution of a controller. It is possible that other, unintended, methods can be called after a redirect_to.

The easy fix for this is to add a "return" after the redirect_to (or after a function that calls redirect_to).

The tool is open-source and is hosted on GitHub at https://github.com/adamdoupe/find_ear_rails

I would appreciate it if you could give me any feedback about the tool.

Thanks for your help, and feel free to email me with any questions!

Waiver system

Many LAN parties require attendees to sign waivers.

Ideally, this system would allow for an administrator to supply an HTML template with certain variables (full name, address, birthdate, etc.). The user could then print it and bring it signed with a signature of themselves or their parents/guardians.

Bonus points/future enhancements:

  • The user should be able to "sign" the form by confirming it via email, or have a parent "sign" it by confirming it via email.

Migrate all calls to Ticket#prix to Ticket#price

When I created Ticket, I used price as the storage for the price of the ticket. I realize now that I'd rather have price be an instance of Money.

What needs to happen is write a migration to movetickets.price to tickets.cents and create a column tickets.currency to store the currency. Then, modify and uncomment the composed_of :price code and point Ticket.prix at Ticket.price, logging a deprecation message until prix no longer exists.

Validate transaction data for offline payments

We don't do any validation because we have trusted, trained users doing it. We should still validate something, at least the price such that all of the registrations add up correctly and the amount paid is the amount due.

Creating admin user results in error page

Hello again,

Now that I have the app running, I am running into an issue when signing up (presumably for the admin account, but I'm not sure).

Navigating to localhost:3000, I'm presented with the splash page, and clicking around on any of the navigation links work (though I obviously don't have any users or events yet). When I click sign up, I get the signup page to load correctly, but once I enter my information, I am presented with the following error text.

The error seems to be "Permission code payments.accept does not exist".

Thanks in advance for any help!

Use AssetHat for asset compression

https://github.com/mintdigital/asset_hat/blob/master/README.rdoc

Your assets are covered.

With Rails’ default asset caching, CSS and JS are concatenated (not even minified) at runtime when that bundle is first requested. Not good enough. To make your pages load faster, AssetHat can automatically:

Easily minify and bundle CSS and JS to reduce file sizes and HTTP requests. Do this on deploy, and avoid any performance hit at runtime.
Load popular third-party JS (like jQuery, YUI, and Ext JS) from Google's CDN when in production, or from localhost in development. It’s as simple as <%= include_js :jquery %> to load straight from Google.
Force image URLs in your CSS to use CDN subdomains (including SSL support), not just the current host.
Add an image’s last Git commit ID to its CSS URLs to bust browser caches (e.g., /images/foo.png?ab12cd3).

Event Schedule System

Each event should have a Schedule of Tournaments and SubEvents. The Schedule should be displayed on the Event's dashboard page in chronological order, with things highlighted if currently in progress and crossed out as they end.

Tournaments and SubEvents need not know their time -- that's the job of the Schedule and its ScheduleItems.

Really Tournaments are a subclass of SubEvent, and anything which is a SubEvent is a Schedule-able. Anything Schedule-able can be a ScheduledItem.

When creating a new ticket for an event as admin, non-number input will output a nasty stack trace

Steps:

  1. create an event
  2. click create ticket so the url looks like [host]/events/1/tickets/new
  3. put a number like 600 in the cost field
  4. put something like "over 9000" in the Available field
  5. click "create ticket"

You get the following:

NoMethodError in Tickets#create

Showing /home/dmotles/code/plas/app/views/tickets/_form.html.erb where line #1 raised:

undefined method `model_name' for NilClass:Class
Extracted source (around line #1):

1: <%= form_for ([@event, @ticket])  do |f| %>
2:   <% if @ticket.errors.any? %>
3:     <div id="error_explanation">
4:       <h2><%= pluralize(@ticket.errors.count, "error") %> prohibited this ticket from being saved:</h2>
Trace of template inclusion: app/views/tickets/new.html.erb

Rails.root: /home/dmotles/code/plas

Application Trace | Framework Trace | Full Trace
app/views/tickets/_form.html.erb:1:in `_app_views_tickets__form_html_erb__3302624983022953928_39195520_3150842096570869018'
app/views/tickets/new.html.erb:3:in `_app_views_tickets_new_html_erb___1007846872533634996_39238320__3039767047594116635'
app/controllers/tickets_controller.rb:62:in `block (2 levels) in create'
app/controllers/tickets_controller.rb:57:in `create'
lib/rack/firebug_logger.rb:9:in `call'
lib/rack/firebug_logger.rb:9:in `call'
Request

Parameters:

{"utf8"=>"✓",
 "authenticity_token"=>"S5fZlj8+6u5+FXwWAj9nkxs/chCR16+CsRnnu5rEjds=",
 "ticket"=>{"name"=>"Registration for one person",
 "cents"=>"600",
 "available"=>"over 9000",
 "date_open(1i)"=>"2011",
 "date_open(2i)"=>"6",
 "date_open(3i)"=>"28",
 "date_open(4i)"=>"00",
 "date_open(5i)"=>"54",
 "date_closed(1i)"=>"2011",
 "date_closed(2i)"=>"6",
 "date_closed(3i)"=>"28",
 "date_closed(4i)"=>"00",
 "date_closed(5i)"=>"54"},
 "commit"=>"Create Ticket",
 "event_id"=>"1"}
Show session dump

Show env dump

Response

Headers:

None

"rails server" command not working

Hello,

I'm relatively new to Github so I'm not sure if this is the best way to write down this issue, but I wanted to try out PLAS, so I followed all the steps:

  • got RVM set up with three rubies: 1.8.7, 1.9.2, and ruby-head
  • git cloned PLAS into home directory on a Mac
  • cd'd to the directory, accepted rvm's trust prompt for the .rvmrc file
  • bundle install worked as expected
  • rake db:migrate worked as expected
  • rails server came up with the following error:
    https://gist.github.com/982397

Again, sorry if I could've explained this better. I'd be happy to share any more information you might need to fix this issue.

Give all pages proper titles

Everything just has a title of "Pittco" right now. We need to use content_for and yield where appropriate in the header and in each view.

Survey system

Jeff Adams from Pittco suggested a survey system.

These surveys can be filled out at registration time, mandatory on next visit, or optional polls.

This would be useful for asking things like

  • What pizza place should we get pizza from?
  • What game do you want to play next in Roulette?
  • Whose performance in karaoke was best?
  • vi or emacs?

User Group and Permission Management

  • PLAS needs to have a robust way to control who is able to do what
  • Groups are Administrators and Users
    • More added later (Checkin staff, tournament admins, shoutbox moderators, etc.)

Centralized configuration class

It's quite common in PHP apps to have a Config static class or global object which accesses key-value configurations in the database or an ini file. I need to uncover what is the "Ruby way" of doing this, that is, if it's any different.

'rake db:migrate' won't work on my machine

erad1cate@ubuntu:~/plas$ rake db:migrate
/home/erad1cate/.rvm/gems/ruby-1.9.2-p180@plas/gems/json-1.5.3/ext/json/ext/json/ext/parser.so: [BUG] Segmentation fault
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]

Aborted

Ticketing System

  • Create master tickets for purchase per event
  • Tickets can come in packs of N for $M per ticket
  • Use PayPal or allow for mailed checks or pre-registered walk-in payments
  • Tickets are never deleted, can be transferred between events (although that will likely never be done)
  • User can purchase N tickets
  • User can assign tickets to other folks

Notification system

Displays to a user or emails them when they've received a ticket or there's a new event, tournament, etc.

Asset Management System

Something so that people can print out stickers or something with a QRcode on them in order to track them as being theirs.

Pittco has never had a theft, so this is of somewhat limited use and priority for us. However, other LANs might benefit from it not only as an attendee asset tracking system, but as an organizational asset tracking system for network equipment, power strips, and more.

Event creation and management

Administrative users should be able to create and manage events. Events have a location, start/end datetime, and a name.

Notices have no style

They are really bland and hard to see. I can't tell when something has gone wrong!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.