Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Use webaudit.unl.edu as the registry source #343

Merged
merged 4 commits into from

2 participants

@mfairchild365

No description provided.

mfairchild365 added some commits
@mfairchild365 mfairchild365 Update driver to use webaudit.unl.edu
Webaudit.unl.edu is now the official source of registry information.  the 'manager' role in webaudit.unl.edu has been changed to 'admin', so reflect that mapping change here.
b7a96ec
@mfairchild365 mfairchild365 The 'manager' role in webaudit.unl.edu has been changed to 'admin', s…
…o reflect that mapping change here.
d9b1a94
@mfairchild365 mfairchild365 The key is no longer the uid 053d2ff
@saltybeagle saltybeagle merged commit 680f8ec into unl:develop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 13, 2014
  1. @mfairchild365

    Update driver to use webaudit.unl.edu

    mfairchild365 authored
    Webaudit.unl.edu is now the official source of registry information.  the 'manager' role in webaudit.unl.edu has been changed to 'admin', so reflect that mapping change here.
  2. @mfairchild365

    The 'manager' role in webaudit.unl.edu has been changed to 'admin', s…

    mfairchild365 authored
    …o reflect that mapping change here.
  3. @mfairchild365
Commits on Mar 14, 2014
  1. @mfairchild365
This page is out of date. Refresh to see the latest.
View
9 src/UNL/VisitorChat/OperatorRegistry/WDN/Driver.php
@@ -3,13 +3,13 @@
class Driver extends \UNL\VisitorChat\CacheableURL implements \UNL\VisitorChat\OperatorRegistry\DriverInterface
{
- public static $baseURI = "http://www1.unl.edu/wdn/registry/";
+ public static $baseURI = "https://webaudit.unl.edu/registry/";
public static $cacheTimeout = 18000; //seconds (5 hours)
function getQueryURL($query)
{
- return self::$baseURI . "?u=" . urlencode($query) . "&output=json";
+ return self::$baseURI . "?query=" . urlencode($query) . "&format=json";
}
function query($query, $doNotCache = false)
@@ -71,14 +71,15 @@ function getSitesByURL($site, $doNotCache = false)
function getSitesForUser($user, $doNotCache = false)
{
- $cachePath = $this->getCachePath($this->getQueryURL($user));
+ $query = $user .'@UNL';
+ $cachePath = $this->getCachePath($this->getQueryURL($query));
if (!$doNotCache && $sites = $this->getCache($cachePath)) {
return new SiteList($sites);
}
//All sites for a user.
- $sites = $this->query($user, $doNotCache);
+ $sites = $this->query($query, $doNotCache);
if (!$sites) {
$sites = array();
View
4 src/UNL/VisitorChat/OperatorRegistry/WDN/Site/Member.php
@@ -43,6 +43,10 @@ function getRole()
//Loop though each of the user's roles for this site and determine their max role.
foreach ($this->roles as $role) {
//Get the role's rank.
+ if ($role == 'admin') {
+ //Map the admin role from the registry to the manager role in the chat system
+ $role = 'manager';
+ }
$key = array_search($role, \UNL\VisitorChat\Controller::$roles);
//If the rank is higher, use that one.
View
2  src/UNL/VisitorChat/OperatorRegistry/WDN/Site/MemberList.php
@@ -14,6 +14,6 @@ function __construct($site, $members)
function current() {
$data = parent::current();
- return new Member(parent::key(), $data['roles'], $this->site);
+ return new Member($data['uid'], $data['roles'], $this->site);
}
}
Something went wrong with that request. Please try again.