Commit b2f655c4 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

[GATE-7] Added tables and beginnings of class for permissions manager.

Cleaned up gateway javascript
Fixed issue with opening and closing of tabs in settings interface.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@6294 b35dd754-fafc-0310-a699-88a17e54d16e
parent 7b69fb54
......@@ -12,7 +12,7 @@
<date>11/10/2006</date>
<minServerVersion>3.1.1</minServerVersion>
<databaseKey>gateway</databaseKey>
<databaseVersion>1</databaseVersion>
<databaseVersion>2</databaseVersion>
<licenseType>gpl</licenseType>
<!-- Admin console meta-data -->
......
......@@ -21,4 +21,11 @@ CREATE TABLE gatewayPseudoRoster (
CREATE INDEX gatewayPsRs_regid_idx ON gatewayPseudoRoster (registrationID);
CREATE INDEX gatewayPsRs_uname_idx ON gatewayPseudoRoster (username);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 1);
CREATE TABLE gatewayRestrictions (
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255),
groupname VARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 2);
......@@ -21,4 +21,11 @@ CREATE TABLE gatewayPseudoRoster (
CREATE INDEX gatewayPsRs_regid_idx ON gatewayPseudoRoster (registrationID);
CREATE INDEX gatewayPsRs_uname_idx ON gatewayPseudoRoster (username);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 1);
CREATE TABLE gatewayRestrictions (
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255),
groupname VARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 2);
......@@ -21,4 +21,11 @@ CREATE TABLE gatewayPseudoRoster (
INDEX gatewayPsRs_uname_idx(username)
);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 1);
CREATE TABLE gatewayRestrictions (
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255),
groupname VARCHAR(50),
INDEX gatewayRstr_ttype_idx(transportType)
);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 2);
......@@ -21,6 +21,13 @@ CREATE TABLE gatewayPseudoRoster (
CREATE INDEX gatewayPsRs_regid_idx ON gatewayPseudoRoster (registrationID);
CREATE INDEX gatewayPsRs_uname_idx ON gatewayPseudoRoster (username);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 1);
CREATE TABLE gatewayRestrictions (
transportType VARCHAR2(15) NOT NULL,
username VARCHAR2(255),
groupname VARCHAR2(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 2);
commit;
......@@ -21,4 +21,11 @@ CREATE TABLE gatewayPseudoRoster (
CREATE INDEX gatewayPsRs_regid_idx ON gatewayPseudoRoster (registrationID);
CREATE INDEX gatewayPsRs_uname_idx ON gatewayPseudoRoster (username);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 1);
CREATE TABLE gatewayRestrictions (
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255),
groupname VARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 2);
......@@ -21,4 +21,11 @@ CREATE TABLE gatewayPseudoRoster (
CREATE INDEX gatewayPsRs_regid_idx ON gatewayPseudoRoster (registrationID);
CREATE INDEX gatewayPsRs_uname_idx ON gatewayPseudoRoster (username);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 1);
CREATE TABLE gatewayRestrictions (
transportType NVARCHAR(15) NOT NULL,
username NVARCHAR(255),
groupname NVARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 2);
......@@ -21,4 +21,11 @@ CREATE TABLE gatewayPseudoRoster (
CREATE INDEX gatewayPsRs_regid_idx ON gatewayPseudoRoster (registrationID);
CREATE INDEX gatewayPsRs_uname_idx ON gatewayPseudoRoster (username);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 1);
CREATE TABLE gatewayRestrictions (
transportType NVARCHAR(15) NOT NULL,
username NVARCHAR(255),
groupname NVARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 2);
-- Add restrictions table
CREATE TABLE gatewayRestrictions (
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255),
groupname VARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
-- Update database version
UPDATE jiveVersion SET version = 2 WHERE name = 'gateway';
// Add restrictions table
CREATE TABLE gatewayRestrictions (
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255),
groupname VARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
// Update database version
UPDATE jiveVersion SET version = 2 WHERE name = 'gateway';
# Add restrictions table
CREATE TABLE gatewayRestrictions (
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255),
groupname VARCHAR(50),
INDEX gatewayRstr_ttype_idx(transportType)
);
# Update database version
UPDATE jiveVersion SET version = 2 WHERE name = 'gateway';
-- Add restrictions table
CREATE TABLE gatewayRestrictions (
transportType VARCHAR2(15) NOT NULL,
username VARCHAR2(255),
groupname VARCHAR2(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
-- Update database version
UPDATE jiveVersion SET version = 2 WHERE name = 'gateway';
commit;
-- Add restrictions table
CREATE TABLE gatewayRestrictions (
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255),
groupname VARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
-- Update database version
UPDATE jiveVersion SET version = 2 WHERE name = 'gateway';
/* Add restrictions table */
CREATE TABLE gatewayRestrictions (
transportType NVARCHAR(15) NOT NULL,
username NVARCHAR(255),
groupname NVARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
/* Update database version */
UPDATE jiveVersion SET version = 2 WHERE name = 'gateway';
/* Add restrictions table */
CREATE TABLE gatewayRestrictions (
transportType NVARCHAR(15) NOT NULL,
username NVARCHAR(255),
groupname NVARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
/* Update database version */
UPDATE jiveVersion SET version = 2 WHERE name = 'gateway';
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway;
/**
* Registration Permissions Manager
*
* Handles who has access to a given transport, both for checking access and for
* managing who is in the access list. Should be used regardless of whether permissions
* are set to "all" or "none" or not as this class checks for those settings on it's own.
*
* @author Daniel Henninger
*/
public class PermissionManager {
}
......@@ -7,19 +7,18 @@ This toggles toggles an individual panel (slides up and down), or switches
between the two if one's already open.
*/
lastID = "";
var lastID = "";
function togglePanel(thisID) {
activeLink = thisID.id+"Link";
if (lastID != "") {
thatID = lastID;
oldLink = thatID.id+"Link";
if ($(thisID).style.display != 'none' && $(thatID).style.display == 'none') {
var activeLink = thisID.id+"Link";
if (lastID != "" && lastID != thisID) {
var oldLink = lastID.id+"Link";
if ($(thisID).style.display != 'none' && $(lastID).style.display == 'none') {
Effect.toggle($(thisID),'slide', {duration: .4});
$(activeLink).className = "";
} else if ($(thisID).style.display == 'none' && $(thatID).style.display != 'none') {
$(thatID).style.display = 'none';
} else if ($(thisID).style.display == 'none' && $(lastID).style.display != 'none') {
$(lastID).style.display = 'none';
$(thisID).style.display = 'block';
$(oldLink).className = "";
$(activeLink).className = "jive-gatewayButtonOn";
......@@ -50,13 +49,13 @@ unchecks a gateway the box goes grey panels aren't accessible.
*/
function checkToggle(theID) {
theCheckbox = theID.id+"checkbox";
testLink = theID.id+"testsLink";
optsLink = theID.id+"optionsLink";
permLink = theID.id+"permsLink";
testPanel = theID.id+"tests";
optsPanel = theID.id+"options";
permPanel = theID.id+"perms";
var theCheckbox = theID.id+"checkbox";
var testLink = theID.id+"testsLink";
var optsLink = theID.id+"optionsLink";
var permLink = theID.id+"permsLink";
var testPanel = theID.id+"tests";
var optsPanel = theID.id+"options";
var permPanel = theID.id+"perms";
if ($(theCheckbox).checked) {
$(theID).className = "jive-gateway";
......@@ -97,6 +96,9 @@ toggleAdd function
This is the function that shows / hides the add registration form
*/
function toggleAdd(theID) {
var jiveAddRegPanel = document.getElementById("jiveAddRegPanel");
var jiveAddRegButton = document.getElementById("jiveAddRegButton");
var jiveAddRegLink = document.getElementById("jiveAddRegLink");
if ($(jiveAddRegPanel).style.display != 'none') {
Effect.SlideUp($(jiveAddRegPanel), {duration: .2})
$(jiveAddRegButton).className = "jive-gateway-addregBtn";
......@@ -115,8 +117,8 @@ toggleEdit function
This is the function that shows / hides the edit fields for an existing registration
*/
function toggleEdit(theNum) {
normalRow = "jiveRegistration"+theNum;
editRow = "jiveRegistrationEdit"+theNum;
var normalRow = "jiveRegistration"+theNum;
var editRow = "jiveRegistrationEdit"+theNum;
if ($(editRow).style.display != 'none') {
$(editRow).className = "jive-registrations-edit";
$(editRow).style.display = 'none';
......@@ -136,6 +138,7 @@ this is for a future feature, to replace the row of filter options with a
dynamic pulldown menu.
*/
/*
function toggleFilters() {
if ($(jiveFilterDrop).style.display != 'none') {
Effect.toggle($(jiveFilterDrop),'slide', {duration: .4});
......@@ -143,6 +146,7 @@ function toggleFilters() {
Effect.toggle($(jiveFilterDrop),'slide', {duration: .4});
}
}
*/
/*
......@@ -150,6 +154,8 @@ toggleGW function
this performs the actual work for enabling or disabling the gateway in
question.
*/
/*
retiring in favor of DWR
function toggleGW(gwType,gwSetting) {
if (document.getElementById(gwSetting)) {
var url = 'gateway-setting-handler.jsp?gwType=' + gwType + '&gwEnabled=';
......@@ -159,6 +165,7 @@ function toggleGW(gwType,gwSetting) {
else {
url = url + "false";
}
var req;
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
} else if (window.ActiveXObject) {
......@@ -168,3 +175,4 @@ function toggleGW(gwType,gwSetting) {
req.send(null);
}
}
*/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment