~dangarner/xibo/server-layout-media-permissions

« back to all changes in this revision

Viewing changes to server/lib/pages/layout.class.php

  • Committer: Dan Garner
  • Date: 2011-08-18 23:34:53 UTC
  • Revision ID: dan@xibo.org.uk-20110818233453-q1cz35j6jb483v70
[server] Tweaks to permissions. XMDS to have GetResource call. Other small changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1505
1505
                            </a>
1506
1506
LINK;
1507
1507
 
1508
 
                        // If we do not have permission to edit, remove the link
1509
 
                        if (!$auth->edit)
1510
 
                            $editLink = '';
1511
 
 
1512
1508
                        if ($auth->modifyPermissions)
1513
1509
                            $editLink .= ' | <a class="XiboFormButton" style="color:#FFF" href="index.php?p=module&mod=' . $mediaType . '&q=Exec&method=PermissionsForm&layoutid=' . $this->layoutid . '&regionid=' . $regionid . '&mediaid=' . $mediaid . '&lkid=' . $lkid . '" title="Click to change permissions for this media">' . $msgPermissions . '</a>';
1514
1510
 
1683
1679
                                $response->keepOpen = true;
1684
1680
                                return $response;
1685
1681
                        }
 
1682
 
 
1683
                    // Need to copy over the permissions from this media item & also the delete permission
 
1684
                    $mediaAuth = $this->user->MediaAuth($mediaid, true);
 
1685
 
 
1686
                    Kit::ClassLoader('layoutmediagroupsecurity');
 
1687
                    $security = new LayoutMediaGroupSecurity($db);
 
1688
                    $security->Link($this->layoutid, $regionid, $mediaid, $this->user->getGroupFromID($this->user->userid, true), $mediaAuth->view, $mediaAuth->edit, 1);
1686
1689
                }
1687
1690
                
1688
1691
                // We want to load a new form