summaryrefslogtreecommitdiffstats
path: root/download/index.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-01-09 07:02:49 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-01-09 07:02:49 +0000
commit53e05bc90da0864e19eabdea083d32080dbaa283 (patch)
treeda54b0c181e9cb820ff98e5f8b6c974d568e504f /download/index.php
parent6906bb43c6635ece5150c9abffe8e9bb16a03f6c (diff)
downloadampache-53e05bc90da0864e19eabdea083d32080dbaa283.tar.gz
ampache-53e05bc90da0864e19eabdea083d32080dbaa283.tar.bz2
ampache-53e05bc90da0864e19eabdea083d32080dbaa283.zip
final commit before beta1 release
Diffstat (limited to 'download/index.php')
-rw-r--r--download/index.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/download/index.php b/download/index.php
index c04f1563..faf6d6fa 100644
--- a/download/index.php
+++ b/download/index.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2005 Ampache.org
+ Copyright (c) 2001 - 2006 Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
@@ -36,8 +36,21 @@ if (conf('demo_mode') || !$user->has_access('25')) {
access_denied();
}
+/*
+ If they are using access lists let's make sure
+ that they have enough access to play this mojo
+*/
+if (conf('access_control')) {
+ $access = new Access(0);
+ if (!$access->check('50', $_SERVER['REMOTE_ADDR'])) {
+ if (conf('debug')) {
+ log_event($user->username,' access_denied ', "Download Access Denied, " . $_SERVER['REMOTE_ADDR'] . " does not have download level
+ }
+ access_denied();
+ }
+} // access_control is enabled
if ($user->prefs['download']) {
if ($_REQUEST['song_id']) {