Updated TokBox and allowing super user to see private folders
This commit is contained in:
parent
ed1505254d
commit
b6adc5c402
4 changed files with 10 additions and 1455 deletions
10
.classpath
10
.classpath
|
|
@ -2,14 +2,12 @@
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/ZUtil"/>
|
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/ZUtil"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="owner.project.facets" value="jst.web"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
|
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
|
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
|
||||||
<classpathentry kind="lib" path="C:/Users/Ziver/Documents/Programmering/Java/libs/xuggler/xuggle-xuggler-5.4.jar"/>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||||
|
<classpathentry kind="lib" path="/Test/lib/commons-cli-1.2.jar"/>
|
||||||
|
<classpathentry kind="lib" path="/Test/lib/slf4j-api-1.6.4.jar"/>
|
||||||
|
<classpathentry kind="lib" path="C:/Users/Ziver/Documents/Programmering/Java/libs/xuggler/xuggle-xuggler-5.4.jar"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0"/>
|
||||||
<classpathentry kind="output" path="build/classes"/>
|
<classpathentry kind="output" path="build/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,8 @@ if( session.getAttribute("user") == null ){
|
||||||
<DIV id="container">
|
<DIV id="container">
|
||||||
<DIV id="content">
|
<DIV id="content">
|
||||||
|
|
||||||
<object type="application/x-shockwave-flash" data="http://me.tokbox.com/vc/c4340coqrrmcsma9/10" width="100%" height="600">
|
<iframe id="videoEmbed" src="http://api.opentok.com/hl/embed/1emba2c3e4bdcf952b00441ab94125c86364c4a0" width="100%" height="600" style="border:none" frameborder="0">
|
||||||
<param name="movie" value="http://me.tokbox.com/vc/c4340coqrrmcsma9/10" />
|
</iframe>
|
||||||
<param name="allowFullScreen" value="true" />
|
|
||||||
<param name="allowScriptAccess" value="always" />
|
|
||||||
<param name="flashvars" value="guestList=false&textChat=true&inviteButton=false&invitingUser=false&showAddFriends=false" />
|
|
||||||
</object>
|
|
||||||
|
|
||||||
</DIV><!-- #content -->
|
</DIV><!-- #content -->
|
||||||
</DIV><!-- #container -->
|
</DIV><!-- #container -->
|
||||||
|
|
|
||||||
|
|
@ -36,16 +36,18 @@ public class Folder extends DBBean{
|
||||||
return load(db, Folder.class, id);
|
return load(db, Folder.class, id);
|
||||||
}
|
}
|
||||||
public static List<Folder> loadSubFolders(DBConnection db, Long id, User user) throws SQLException{
|
public static List<Folder> loadSubFolders(DBConnection db, Long id, User user) throws SQLException{
|
||||||
PreparedStatement sql = db.getPreparedStatement("SELECT * FROM Folder WHERE parent=? AND (isPrivate=0 OR user=?)");
|
PreparedStatement sql = db.getPreparedStatement("SELECT * FROM Folder WHERE parent=? AND (isPrivate=0 OR user=? OR ?)");
|
||||||
sql.setLong(1, id);
|
sql.setLong(1, id);
|
||||||
sql.setLong(2, user.getId());
|
sql.setLong(2, user.getId());
|
||||||
|
sql.setBoolean(3, user.isSuperUser());
|
||||||
return DBConnection.exec(sql, DBBeanSQLResultHandler.createList(Folder.class, db));
|
return DBConnection.exec(sql, DBBeanSQLResultHandler.createList(Folder.class, db));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Folder loadRoot(DBConnection db, User user) throws SQLException{
|
public static Folder loadRoot(DBConnection db, User user) throws SQLException{
|
||||||
PreparedStatement sql = db.getPreparedStatement("SELECT * FROM Folder WHERE path=? AND (isPrivate=0 OR user=?)");
|
PreparedStatement sql = db.getPreparedStatement("SELECT * FROM Folder WHERE path=? AND (isPrivate=0 OR user=? OR ?)");
|
||||||
sql.setString(1, "/");
|
sql.setString(1, "/");
|
||||||
sql.setLong(2, user.getId());
|
sql.setLong(2, user.getId());
|
||||||
|
sql.setBoolean(3, user.isSuperUser());
|
||||||
return DBConnection.exec(sql, DBBeanSQLResultHandler.create(Folder.class, db));
|
return DBConnection.exec(sql, DBBeanSQLResultHandler.create(Folder.class, db));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue