Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Commit

Permalink
Added Audiowall permissions check, added permission check on music de…
Browse files Browse the repository at this point in the history
…tail save/delete, removed suetest
  • Loading branch information
connor642 committed Apr 11, 2018
1 parent 612a2d2 commit b8b01c1
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 96 deletions.
7 changes: 5 additions & 2 deletions audiowalls/edit.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<?php
require_once('pre.php');
Output::set_title("Audiowall:");

MainTemplate::set_sidebar(NULL);
Output::add_script("../js/jquery-ui-1.10.3.custom.min.js");
Output::add_script("aw.js");
Output::add_less_stylesheet("aw.less");
Output::add_stylesheet("aw.css");
$aw_set = AudiowallSets::get((int)$_REQUEST['id']);
if ($aw_set == null){
exit();
Output::http_error(404);
}
else if(!$aw_set->user_can_view()) {
Output::http_error(401);
}

$aw_walls = $aw_set->get_walls();
Expand Down
10 changes: 5 additions & 5 deletions music/detail/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,17 +266,17 @@
</label>
</div>
</div>
</div>
<div class=\"form-group\">
</div>");
if(Session::is_group_user("Music Admin")) {
echo("<div class=\"form-group\">
<div class=\"col-md-10 col-md-offset-2\">
<button type=\"submit\" class=\"btn btn-primary btn-block\">
".Bootstrap::fontawesome("save", "save")."
Save
</button>
</div>
</div>");
if(Session::is_user("Music Admin") && $track->get_dirid() != 3) {
echo("<div class=\"form-group\">
</div>
<div class=\"form-group\">
<div class=\"col-md-10 col-md-offset-2\">
<a data-toggle=\"modal\" data-target=\"#delete-modal\" class=\"btn btn-danger btn-block track-delete\" data-dps-id=\"" . $track->get_id() . "\" data-dps-title=\"" . $track->get_title() . "\">
".Bootstrap::fontawesome("trash")."
Expand Down
4 changes: 2 additions & 2 deletions music/search/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@
echo("<h3>Sorry, no results for ".$query."</h3>");
echo("<h4>Try a more generic search term.</h4>");
}
echo("<h4>Enter keywords below to search for tracks:</h4>
echo("<h4>Enter keywords below to search for tracks</h4>
<form action=\"".LINK_ABS."music/search\" method=\"GET\" class=\"form-inline\">
<input type=\"text\" placeholder=\"Search Tracks\" name=\"q\" class=\"col-9\">
<input type=\"text\" placeholder=\"Search Tracks\" name=\"q\" class=\"col-9 form-control\">
<input type=\"submit\" class=\"btn btn-primary\" value=\"Search\" class=\"col-2 col-offset-1\">
</form>");
}
Expand Down
43 changes: 0 additions & 43 deletions suetest/.sublf90.tmp

This file was deleted.

44 changes: 0 additions & 44 deletions suetest/index.php

This file was deleted.

Empty file removed suetest/index.php~RF7aae98.TMP
Empty file.

0 comments on commit b8b01c1

Please sign in to comment.