Index: webadmin/__init__.py
===================================================================
--- webadmin/__init__.py	(revision 2524)
+++ webadmin/__init__.py	(working copy)
@@ -4,3 +4,4 @@
 from webadmin.perm import *
 from webadmin.plugin import *
 from webadmin.ticket import *
+from webadmin.user import *
Index: webadmin/ticket.py
===================================================================
--- webadmin/ticket.py	(revision 2524)
+++ webadmin/ticket.py	(working copy)
@@ -34,6 +34,10 @@
 
     def process_admin_request(self, req, cat, page, component):
         req.perm.assert_permission('TICKET_ADMIN')
+        roles = self.env.get_roles()
+        status = self.env.get_status()
+        req.hdf['admin.roles'] = roles
+        req.hdf['admin.status'] = status
         
         # Detail view?
         if component:
@@ -43,6 +47,8 @@
                     comp.name = req.args.get('name')
                     comp.owner = req.args.get('owner')
                     comp.description = req.args.get('description')
+                    comp.role = req.args.get('role')
+                    comp.status = req.args.get('status')
                     comp.update()
                     req.redirect(self.env.href.admin(cat, page))
                 elif req.args.get('cancel'):
@@ -51,8 +57,11 @@
             req.hdf['admin.component'] = {
                 'name': comp.name,
                 'owner': comp.owner,
-                'description': comp.description
+                'description': comp.description,
+                'role': comp.role,
+                'status': comp.status
             }
+            
         else:
             if req.method == 'POST':
                 # Add Component
@@ -61,6 +70,9 @@
                     comp.name = req.args.get('name')
                     if req.args.get('owner'):
                         comp.owner = req.args.get('owner')
+                    comp.role = req.args.get('role')
+                    comp.status = req.args.get('status')
+                    self.env.log.debug(str(req.args))
                     comp.insert()
                     req.redirect(self.env.href.admin(cat, page))
 
@@ -87,11 +99,15 @@
                         req.redirect(self.env.href.admin(cat, page))
 
             default = self.config.get('ticket', 'default_component')
+            
             req.hdf['admin.components'] = \
                 [{'name': c.name, 'owner': c.owner,
                   'is_default': c.name == default,
-                  'href': self.env.href.admin(cat, page, c.name)
-                 } for c in ticket.Component.select(self.env)]
+                  'href': self.env.href.admin(cat, page, c.name),
+                  'role': c.role,
+                  'status': c.status
+                 } for c in ticket.Component.select(self.env, roles=roles, status=status)]
+            req.hdf['admin.roles'] = roles
 
 
         restrict_owner = self.config.get('ticket', 'restrict_owner')
@@ -106,13 +122,19 @@
 
     implements(IAdminPageProvider)
 
+
     # IAdminPageProvider
     def get_admin_pages(self, req):
         if req.perm.has_permission('TICKET_ADMIN'):
             yield ('ticket', 'Ticket System', 'versions', 'Versions')
 
+
     def process_admin_request(self, req, cat, page, version):
         req.perm.assert_permission('TICKET_ADMIN')
+        roles = self.env.get_roles()
+        status = self.env.get_status()
+        req.hdf['admin.roles'] = roles
+        req.hdf['admin.status'] = status
         
         # Detail view?
         if version:
@@ -123,6 +145,8 @@
                     if req.args.get('time'):
                         ver.time =  util.parse_date(req.args.get('time'))
                     ver.description = req.args.get('description')
+                    ver.role = req.args.get('role')
+                    ver.status = req.args.get('status')
                     ver.update()
                     req.redirect(self.env.href.admin(cat, page))
                 elif req.args.get('cancel'):
@@ -131,8 +155,13 @@
             req.hdf['admin.version'] = {
                 'name': ver.name,
                 'time': ver.time and util.format_datetime(ver.time) or '',
-                'description': ver.description
+                'description': ver.description,
+                'role': ver.role,
+                'status': ver.status
             }
+            req.hdf['admin.roles'] = roles
+            req.hdf['admin.status'] = status
+            
         else:
             if req.method == 'POST':
                 # Add Version
@@ -141,6 +170,8 @@
                     ver.name = req.args.get('name')
                     if req.args.get('time'):
                         ver.time = util.parse_date(req.args.get('time'))
+                    ver.role = req.args.get('role')
+                    ver.status = req.args.get('status')
                     ver.insert()
                     req.redirect(self.env.href.admin(cat, page))
                          
@@ -171,8 +202,11 @@
                 [{'name': v.name,
                   'time': v.time and util.format_datetime(v.time) or '',
                   'is_default': v.name == default,
-                  'href': self.env.href.admin(cat, page, v.name)
-                 } for v in ticket.Version.select(self.env)]
+                  'href': self.env.href.admin(cat, page, v.name),
+                  'role': v.role,
+                  'status': v.status
+                 } for v in ticket.Version.select(self.env, roles=roles, 
+                 status=status)]
 
         return 'admin_version.cs', None
 
Index: webadmin/templates/admin_version.cs
===================================================================
--- webadmin/templates/admin_version.cs	(revision 2524)
+++ webadmin/templates/admin_version.cs	(working copy)
@@ -13,6 +13,16 @@
       var:admin.version.time ?>"></label>
    </div>
    <div class="field">
+    <label>Role:<br /><?cs
+    call:hdf_select(admin.roles, "role", admin.version.role, 0) ?>
+    </label>
+   </div>
+   <div class="field">
+    <label>Status:<br /><?cs
+    call:hdf_select(admin.status, "status", admin.version.status, 0) ?>
+    </label>
+   </div>
+   <div class="field">
     <fieldset class="iefix">
      <label for="description">Description (you may use <a tabindex="42" href="<?cs
        var:trac.href.wiki ?>/WikiFormatting">WikiFormatting</a> here):</label>
@@ -41,6 +51,16 @@
     <label>Time: <input type="text" name="time" value="<?cs
       var:admin.version.time ?>"></label>
    </div>
+   <div class="field">
+    <label>Role:<br /><?cs
+    call:hdf_select(admin.roles, "role", admin.version.role, 0) ?>
+    </label>
+   </div>
+   <div class="field">
+    <label>Status:<br /><?cs
+    call:hdf_select(admin.status, "status", admin.version.status, 0) ?>
+    </label>
+   </div>
    <div class="buttons">
     <input type="submit" name="add" value="Add">
    </div>
@@ -50,14 +70,20 @@
  if:len(admin.versions) ?><form method="POST">
   <table class="listing" id="verlist">
    <thead>
-    <tr><th class="sel">&nbsp;</th><th>Name</th>
-    <th>Time</th><th>Default</th></tr>
+    <tr><th class="sel">&nbsp;</th>
+    <th>Name</th>
+    <th>Time</th>
+    <th>Role</th>
+    <th>Status</th>
+    <th>Default</th></tr>
    </thead><tbody><?cs
    each:ver = admin.versions ?>
    <tr>
     <td><input type="checkbox" name="sel" value="<?cs var:ver.name ?>" /></td>
     <td><a href="<?cs var:ver.href ?>"><?cs var:ver.name ?></a></td>
     <td><?cs var:ver.time ?></td>
+    <td><?cs var:ver.role ?></td>
+    <td><?cs var:ver.status ?></td>
      <td class="default"><input type="radio" name="default" value="<?cs
        var:ver.name ?>"<?cs
        if:ver.is_default ?> checked="checked" <?cs /if ?>></td>
Index: webadmin/templates/admin_component.cs
===================================================================
--- webadmin/templates/admin_component.cs	(revision 2524)
+++ webadmin/templates/admin_component.cs	(working copy)
@@ -17,6 +17,16 @@
      /if ?></label>
    </div>
    <div class="field">
+    <label>Role:<br /><?cs
+    call:hdf_select(admin.roles, "role", admin.component.role, 0) ?>
+    </label>
+   </div>
+   <div class="field">
+    <label>Status:<br /><?cs
+    call:hdf_select(admin.status, "status", admin.component.status, 0) ?>
+    </label>
+   </div>
+   <div class="field">
     <fieldset class="iefix">
      <label for="description">Description (you may use <a tabindex="42" href="<?cs
        var:trac.href.wiki ?>/WikiFormatting">WikiFormatting</a> here):</label>
@@ -47,6 +57,16 @@
      else ?><input type="text" name="owner" /><?cs
      /if ?></label>
    </div>
+   <div class="field">
+    <label>Role:<br /><?cs
+    call:hdf_select(admin.roles, "role", "", 0) ?>
+    </label>
+   </div>
+   <div class="field">
+    <label>Status:<br /><?cs
+    call:hdf_select(admin.status, "status", "", 0) ?>
+    </label>
+   </div>
    <div class="buttons">
     <input type="submit" name="add" value="Add">
    </div>
@@ -56,8 +76,12 @@
  if:len(admin.components) ?><form method="POST">
   <table class="listing" id="complist">
    <thead>
-    <tr><th class="sel">&nbsp;</th><th>Name</th>
-    <th>Owner</th><th>Default</th></tr>
+    <tr><th class="sel">&nbsp;</th>
+    <th>Name</th>
+    <th>Owner</th>
+    <th>Role</th>
+    <th>Status</th>
+    <th>Default</th></tr>
    </thead><?cs
    each:comp = admin.components ?>
     <tr>
@@ -66,6 +90,8 @@
      <td class="name"><a href="<?cs var:comp.href?>"><?cs
        var:comp.name ?></a></td>
      <td class="owner"><?cs var:comp.owner ?></td>
+     <td class="role"><?cs var:comp.role ?></td>
+     <td class="status"><?cs var:comp.status ?></td>
      <td class="default"><input type="radio" name="default" value="<?cs
        var:comp.name ?>"<?cs
        if:comp.is_default ?> checked="checked" <?cs /if ?>></td>
