예제 #1
0
 public function verifyPlaylistPrivileges($required_priv_name, $entryId, $partnerId)
 {
     // break all privileges to their pairs - this is to support same "multi-priv" method expected for
     // edit privilege (edit:XXX,edit:YYY,...)
     $allPrivileges = explode(',', $this->privileges);
     // foreach pair - check privileges on playlist
     foreach ($allPrivileges as $priv) {
         // extract playlist ID from pair
         $exPrivileges = explode(':', $priv);
         if ($exPrivileges[0] == $required_priv_name) {
             // if found in playlist - return true
             if (myPlaylistUtils::isEntryInPlaylist($entryId, $exPrivileges[1], $partnerId)) {
                 return true;
             }
         }
     }
     return false;
 }