Changeset 173
- Timestamp:
- 06/28/11 14:51:32 (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/changelog.txt
r172 r173 29 29 - Added: DreamboxPlugin (csp-agent) support for more/older dm500 images. Basic (unsecured) file upload support. 30 30 - Added: proxy-reference.html updated with highlighting for important elements and additional examples. 31 - Added: Ability to set start and expiration date for user accounts. 31 - Added: Ability to set start and expiration date for user accounts (only Simple and XmlUsermanager). 32 - Added: Ability to set minimum interval between ecm's in seconds (ecm-rate). 32 33 33 34 - Changes to proxy.xml: -
trunk/config/proxy-reference.html
r172 r173 793 793 794 794 <a name="user-manager/auth-config/user"> 795 <div class='indent'><strong>user-manager/auth-config/user (attributes: *name, *password, display-name, ip-mask, profiles, max-connections, admin, enabled, map-exclude, start-date, expiration-date, debug)</strong></div><br />795 <div class='indent'><strong>user-manager/auth-config/user (attributes: *name, *password, display-name, ip-mask, profiles, max-connections, admin, enabled, map-exclude, start-date, expiration-date, ecm-rate, debug)</strong></div><br /> 796 796 One user definition for the SimpleUserManager (also used by the XmlUserManager, see <strong>README.XmlUserManager.txt</strong> for more details):<br /><br /> 797 797 - <strong class='bold'>name</strong>: User name, avoid long names, spaces and special characters. There are no particular limitations as far as the proxy is concerned, but the camd clients may have them.<br /> … … 805 805 - <strong class='bold'>map-exclude</strong>: true/false (default: false). Set to true to prevent the user from causing changes to the service maps. If a particular user is sending bad ecms or is otherwise misbehaving, this will protect the service mappings and ensure no other users are affected. Only use this if you are sure a particular client is misbehaving, the service mapping can't work if no clients are allowed to update the map.<br /> 806 806 - <strong class='bold'>start-date</strong>: (dd-mm-yyyy) Start date for user account.<br /> 807 - <strong class='bold'>ecm-rate</strong>: Minimum interval between ecm's in seconds (disabled by default).<br /> 807 808 - <strong class='bold'>expiration-date</strong>: (dd-mm-yyyy) Expiration date for the user account.<br /> 808 809 - <strong class='bold'>debug</strong>: true/false (default: false). Set to true to enable ecm/emm/zap logging for this user only (has no effect if these are already enabled globally).<br /> -
trunk/src/com/bowman/cardserv/SimpleUserManager.java
r172 r173 80 80 } catch (ConfigException e) {} 81 81 82 int EcmRate = -1; 83 try { 84 EcmRate = xml.getIntValue("ecm-rate"); 85 } catch (ConfigException e) {} 86 82 87 int maxConnections = xml.getIntValue("max-connections", -1); 83 88 … … 88 93 89 94 UserEntry user = new UserEntry(xml.getStringValue("name"), xml.getStringValue("password"), ipMask, emailAddr, 90 maxConnections, enabled, admin, exclude, startDate, expirationDate, debug);95 maxConnections, enabled, admin, exclude, startDate, expirationDate, EcmRate, debug); 91 96 92 97 try { … … 249 254 250 255 public int getAllowedEcmRate(String user) { 251 return -1; // return minimum interval between ecm in seconds, -1 for no limit 256 UserEntry entry = getUser(user); 257 if(entry == null) return -1; // return minimum interval between ecm in seconds, -1 for no limit 258 else return entry.EcmRate; 252 259 } 253 260 … … 258 265 String email, displayName; 259 266 String startDate, expirationDate; 260 int maxConnections ;267 int maxConnections, EcmRate; 261 268 boolean enabled, admin, exclude, debug; 262 269 Set profiles = new HashSet(); 263 270 264 271 public UserEntry(String name, String password, String ipMask, String email, int maxConnections, boolean enabled, 265 boolean admin, boolean exclude, String startDate, String expirationDate, boolean debug)272 boolean admin, boolean exclude, String startDate, String expirationDate, int EcmRate, boolean debug) 266 273 { 267 274 this.name = name; … … 276 283 this.startDate = startDate; 277 284 this.expirationDate = expirationDate; 285 this.EcmRate = EcmRate; 278 286 this.debug = debug; 279 287 }
Note:
See TracChangeset
for help on using the changeset viewer.