From: <ro...@us...> - 2006-08-11 18:38:14
|
Revision: 308 Author: rouquin Date: 2006-08-11 11:37:56 -0700 (Fri, 11 Aug 2006) ViewCVS: http://svn.sourceforge.net/tcdb/?rev=308&view=rev Log Message: ----------- A few updates Modified Paths: -------------- Website/App_Code/Common.cs Website/App_Code/Versions.cs Website/App_Code/tcdbDataSet.xsd Website/App_Code/tcdbDataSet.xss Website/Includes/AdministrationTree.ascx.cs Website/Includes/Builds.ascx Website/Includes/Builds.ascx.cs Website/Includes/FeaturesTree.ascx.cs Website/Includes/Products.ascx.cs Website/Includes/Rights.ascx Website/Includes/Rights.ascx.cs Website/Includes/RoleAssignments.ascx.cs Website/Includes/UserRoles.ascx.cs Website/Includes/UserSettings.ascx.cs Website/Includes/Versions.ascx Website/Includes/Versions.ascx.cs Modified: Website/App_Code/Common.cs =================================================================== --- Website/App_Code/Common.cs 2006-08-11 14:16:29 UTC (rev 307) +++ Website/App_Code/Common.cs 2006-08-11 18:37:56 UTC (rev 308) @@ -1396,18 +1396,21 @@ public static int PRODUCT_CREATED = -2; public static int ROLE_ADMIN = 1; + public static int ROLE_BASIC_USER = 2; + public static string CODE_AI = "ai"; public static string CODE_ASSIGNMENT = "a"; - public static string CODE_USER = "u"; - public static string CODE_AI = "ai"; - public static string CODE_WO = "wo"; + public static string CODE_BUILD = "b"; + public static string CODE_CREATED = "created"; + public static string CODE_MODE = "m"; public static string CODE_PRODUCT = "p"; - public static string CODE_VERSION = "v"; public static string CODE_RIGHT = "rt"; public static string CODE_ROLE = "r"; - public static string CODE_MODE = "m"; - public static string CODE_CREATED = "created"; public static string CODE_TYPE = "t"; + public static string CODE_USER = "u"; + public static string CODE_VERSION = "v"; + public static string CODE_WO = "wo"; + // TODO: figure this one out //public static bool ASSIGNMENT_PRIORITY_ALL = null; @@ -1486,6 +1489,21 @@ public static string RIGHTS_PRODUCT_EDIT = "product_edit"; public static string RIGHTS_PRODUCT_CREATE = "product_create"; public static string RIGHTS_PRODUCT_DELETE = "product_delete"; + + public static string RIGHTS_VERSION_VIEW = "version_view"; + public static string RIGHTS_VERSION_EDIT = "version_edit"; + public static string RIGHTS_VERSION_CREATE = "version_create"; + public static string RIGHTS_VERSION_HIDE = "version_hide"; + + public static string RIGHTS_BUILD_VIEW = "build_view"; + public static string RIGHTS_BUILD_EDIT = "build_edit"; + public static string RIGHTS_BUILD_CREATE = "build_create"; + public static string RIGHTS_BUILD_HIDE = "build_hide"; + + public static string RIGHTS_TESTPASS_VIEW = "testpass_view"; + public static string RIGHTS_TESTPASS_EDIT = "testpass_edit"; + public static string RIGHTS_TESTPASS_CREATE = "testpass_create"; + public static string RIGHTS_TESTPASS_HIDE = "testpass_hide"; } public static class Help Modified: Website/App_Code/Versions.cs =================================================================== --- Website/App_Code/Versions.cs 2006-08-11 14:16:29 UTC (rev 307) +++ Website/App_Code/Versions.cs 2006-08-11 18:37:56 UTC (rev 308) @@ -16,32 +16,56 @@ /// </summary> public class VersionDB : Page { - public static ProductVersion GetVersion(int VersionID) + public static Release GetVersion(int VersionID) { tcdbDataSetTableAdapters.db_versionTableAdapter versionAdapter = new tcdbDataSetTableAdapters.db_versionTableAdapter(); tcdbDataSet.db_versionDataTable versionTable = versionAdapter.GetData(VersionID, null, true); - ProductVersion version = new ProductVersion(); + Release version = new Release(); if (versionTable.Count > 0) - version = new ProductVersion(versionTable[0]); + version = new Release(versionTable[0]); return version; } - public static List<ProductVersion> GetVersionList(Nullable<int> ProductID, Nullable<bool> active) + public static List<Release> GetVersionList(Nullable<int> ProductID, Nullable<bool> active) { tcdbDataSetTableAdapters.db_versionTableAdapter versionAdapter = new tcdbDataSetTableAdapters.db_versionTableAdapter(); tcdbDataSet.db_versionDataTable versionTable = versionAdapter.GetData(null, ProductID, active); - List<ProductVersion> versionList = new List<ProductVersion>(); + List<Release> versionList = new List<Release>(); foreach (tcdbDataSet.db_versionRow row in versionTable) - versionList.Add(new ProductVersion(row)); + versionList.Add(new Release(row)); return versionList; } + + public static Build GetBuild(int buildID) + { + tcdbDataSetTableAdapters.db_buildTableAdapter bAdapter = new tcdbDataSetTableAdapters.db_buildTableAdapter(); + tcdbDataSet.db_buildDataTable bTable = bAdapter.GetData(null, null, buildID); + Build build = new Build(); + + if (bTable.Count > 0) + build = new Build(bTable[0]); + + return build; + } + + public static List<Build> GetBuildList(Nullable<int> versionID, Nullable<bool> active) + { + tcdbDataSetTableAdapters.db_buildTableAdapter bAdapter = new tcdbDataSetTableAdapters.db_buildTableAdapter(); + tcdbDataSet.db_buildDataTable bTable = bAdapter.GetData(active, versionID, null); + List<Build> buildList = new List<Build>(); + + foreach (tcdbDataSet.db_buildRow row in bTable) + buildList.Add(new Build(row)); + + return buildList; + } } - public class ProductVersion + public class Release { private int p_versionid; private Product p_product; @@ -52,7 +76,7 @@ // TODO: Implement these as the time is right //private List<Platform> platforms; - public ProductVersion() + public Release() { p_versionid = 0; p_product = null; @@ -61,7 +85,7 @@ p_active = false; } - public ProductVersion(int versionID, int productID, string number, string code, bool active, DateTime dateCreated) + public Release(int versionID, int productID, string number, string code, bool active, DateTime dateCreated) { p_versionid = versionID; p_product = ProductDB.GetProduct(true,productID,null); @@ -71,7 +95,7 @@ p_datecreated = dateCreated; } - public ProductVersion(tcdbDataSet.db_versionRow row) + public Release(tcdbDataSet.db_versionRow row) { p_versionid = row.versionID; p_product = ProductDB.GetProduct(true, row.productID, null); @@ -128,4 +152,74 @@ return NUMBER; } } + + public class Build + { + private int p_id; + private Release p_version; + private string p_number; + private bool p_active; + private DateTime p_datecreated; + + public Build() + { + p_id = 0; + p_version = null; + p_number = null; + p_active = false; + } + + public Build(int buildID, int versionID, string number, bool active, DateTime dateCreated) + { + p_id = buildID; + p_version = VersionDB.GetVersion(versionID); + p_number = number; + p_active = active; + p_datecreated = dateCreated; + } + + public Build(tcdbDataSet.db_buildRow row) + { + p_id = row.buildID; + p_version = VersionDB.GetVersion(row.versionID); + p_number = row.number; + p_active = row.active; + p_datecreated = row.dateCreated; + } + + public int ID + { + get { return p_id; } + set { p_id = value; } + } + + public Release VERSION + { + get { return p_version; } + set { p_version = value; } + } + + public string NUMBER + { + get { return p_number; } + set { p_number = value; } + } + + public bool ACTIVE + { + get { return p_active; } + set { p_active = value; } + } + + public DateTime DATECREATED + { + get { return p_datecreated; } + set { p_datecreated = value; } + } + + public override string ToString() + { + return NUMBER; + } + } } \ No newline at end of file Modified: Website/App_Code/tcdbDataSet.xsd =================================================================== --- Website/App_Code/tcdbDataSet.xsd 2006-08-11 14:16:29 UTC (rev 307) +++ Website/App_Code/tcdbDataSet.xsd 2006-08-11 18:37:56 UTC (rev 308) @@ -376,8 +376,6 @@ </Parameter> <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@code" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="code" SourceColumnNullMapping="False" SourceVersion="Current"> </Parameter> - <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@active" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="active" SourceColumnNullMapping="False" SourceVersion="Current"> - </Parameter> </Parameters> </DbCommand> </InsertCommand> @@ -1023,8 +1021,6 @@ </Parameter> <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@number" Precision="0" ProviderType="VarChar" Scale="0" Size="20" SourceColumn="number" SourceColumnNullMapping="False" SourceVersion="Current"> </Parameter> - <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@active" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="active" SourceColumnNullMapping="False" SourceVersion="Current"> - </Parameter> </Parameters> </DbCommand> </InsertCommand> @@ -1036,7 +1032,7 @@ </Parameter> <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@active" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumnNullMapping="False" SourceVersion="Current"> </Parameter> - <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@versionID" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumnNullMapping="False" SourceVersion="Current"> + <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@versionID" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current"> </Parameter> <Parameter AllowDbNull="True" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@buildID" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="False" SourceVersion="Current"> </Parameter> @@ -1608,7 +1604,7 @@ </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="db_platform" msprop:Generator_UserTableName="db_platform" msprop:Generator_RowDeletedName="db_platformRowDeleted" msprop:Generator_TableClassName="db_platformDataTable" msprop:Generator_RowChangedName="db_platformRowChanged" msprop:Generator_RowClassName="db_platformRow" msprop:Generator_RowChangingName="db_platformRowChanging" msprop:Generator_RowEvArgName="db_platformRowChangeEvent" msprop:Generator_RowEvHandlerName="db_platformRowChangeEventHandler" msprop:Generator_TablePropName="db_platform" msprop:Generator_TableVarName="tabledb_platform" msprop:Generator_RowDeletingName="db_platformRowDeleting"> + <xs:element name="db_platform" msprop:Generator_UserTableName="db_platform" msprop:Generator_RowDeletedName="db_platformRowDeleted" msprop:Generator_RowChangedName="db_platformRowChanged" msprop:Generator_RowClassName="db_platformRow" msprop:Generator_RowChangingName="db_platformRowChanging" msprop:Generator_RowEvArgName="db_platformRowChangeEvent" msprop:Generator_RowEvHandlerName="db_platformRowChangeEventHandler" msprop:Generator_TableClassName="db_platformDataTable" msprop:Generator_TableVarName="tabledb_platform" msprop:Generator_RowDeletingName="db_platformRowDeleting" msprop:Generator_TablePropName="db_platform"> <xs:complexType> <xs:sequence> <xs:element name="platformID" msprop:Generator_UserColumnName="platformID" msprop:Generator_ColumnPropNameInRow="platformID" msprop:Generator_ColumnVarNameInTable="columnplatformID" msprop:Generator_ColumnPropNameInTable="platformIDColumn" type="xs:int" /> @@ -1638,7 +1634,7 @@ </xs:sequence> </xs:complexType> </xs:element> - <xs:element name="db_build" msprop:Generator_UserTableName="db_build" msprop:Generator_RowDeletedName="db_buildRowDeleted" msprop:Generator_TableClassName="db_buildDataTable" msprop:Generator_RowChangedName="db_buildRowChanged" msprop:Generator_RowClassName="db_buildRow" msprop:Generator_RowChangingName="db_buildRowChanging" msprop:Generator_RowEvArgName="db_buildRowChangeEvent" msprop:Generator_RowEvHandlerName="db_buildRowChangeEventHandler" msprop:Generator_TablePropName="db_build" msprop:Generator_TableVarName="tabledb_build" msprop:Generator_RowDeletingName="db_buildRowDeleting"> + <xs:element name="db_build" msprop:Generator_UserTableName="db_build" msprop:Generator_RowDeletedName="db_buildRowDeleted" msprop:Generator_RowChangedName="db_buildRowChanged" msprop:Generator_RowClassName="db_buildRow" msprop:Generator_RowChangingName="db_buildRowChanging" msprop:Generator_RowEvArgName="db_buildRowChangeEvent" msprop:Generator_RowEvHandlerName="db_buildRowChangeEventHandler" msprop:Generator_TableClassName="db_buildDataTable" msprop:Generator_TableVarName="tabledb_build" msprop:Generator_RowDeletingName="db_buildRowDeleting" msprop:Generator_TablePropName="db_build"> <xs:complexType> <xs:sequence> <xs:element name="buildID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="buildID" msprop:Generator_ColumnPropNameInRow="buildID" msprop:Generator_ColumnVarNameInTable="columnbuildID" msprop:Generator_ColumnPropNameInTable="buildIDColumn" type="xs:int" /> Modified: Website/App_Code/tcdbDataSet.xss =================================================================== --- Website/App_Code/tcdbDataSet.xss 2006-08-11 14:16:29 UTC (rev 307) +++ Website/App_Code/tcdbDataSet.xss 2006-08-11 18:37:56 UTC (rev 308) @@ -4,27 +4,27 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. </autogenerated>--> -<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="390" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout"> +<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="3" ViewPortY="807" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout"> <Shapes> - <Shape ID="DesignTable:db_products" ZOrder="19" X="28" Y="453" Height="241" Width="213" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="194" /> - <Shape ID="DesignTable:db_actionItems" ZOrder="18" X="619" Y="9" Height="292" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="228" SplitterPosition="228" /> - <Shape ID="DesignTable:db_status" ZOrder="17" X="272" Y="369" Height="122" Width="296" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="75" /> - <Shape ID="DesignTable:db_notes" ZOrder="16" X="309" Y="11" Height="156" Width="208" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="109" /> - <Shape ID="DesignTable:db_assignments" ZOrder="15" X="636" Y="368" Height="275" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="228" /> - <Shape ID="DesignTable:db_testPass" ZOrder="14" X="25" Y="317" Height="122" Width="211" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="75" /> - <Shape ID="DesignTable:db_version" ZOrder="13" X="268" Y="539" Height="190" Width="216" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="143" /> - <Shape ID="DesignTable:db_roleProductUser" ZOrder="12" X="903" Y="671" Height="156" Width="255" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="109" /> - <Shape ID="DesignTable:db_roleProduct" ZOrder="11" X="904" Y="843" Height="105" Width="231" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" /> - <Shape ID="DesignTable:db_roleUserProduct" ZOrder="10" X="593" Y="838" Height="190" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="109" /> - <Shape ID="DesignTable:db_roleRight" ZOrder="9" X="38" Y="760" Height="190" Width="216" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="109" /> - <Shape ID="DesignTable:db_userRights" ZOrder="8" X="938" Y="13" Height="207" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="160" /> - <Shape ID="DesignTable:db_rightRole" ZOrder="3" X="329" Y="925" Height="139" Width="217" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="92" /> - <Shape ID="DesignTable:db_role" ZOrder="7" X="306" Y="769" Height="139" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="92" /> - <Shape ID="DesignTable:db_users" ZOrder="6" X="54" Y="33" Height="258" Width="201" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="211" /> - <Shape ID="DesignTable:db_config" ZOrder="5" X="311" Y="178" Height="156" Width="200" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="109" /> - <Shape ID="DesignTable:db_rights" ZOrder="4" X="585" Y="658" Height="156" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="109" /> - <Shape ID="DesignTable:db_platform" ZOrder="2" X="15" Y="969" Height="173" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="126" /> - <Shape ID="DesignTable:db_build" ZOrder="1" X="913" Y="986" Height="156" Width="247" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="109" /> + <Shape ID="DesignTable:db_products" ZOrder="3" X="71" Y="1170" Height="241" Width="213" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="194" /> + <Shape ID="DesignTable:db_actionItems" ZOrder="19" X="394" Y="324" Height="292" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="228" SplitterPosition="228" /> + <Shape ID="DesignTable:db_status" ZOrder="18" X="723" Y="482" Height="122" Width="296" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="75" /> + <Shape ID="DesignTable:db_notes" ZOrder="17" X="299" Y="34" Height="156" Width="208" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="109" /> + <Shape ID="DesignTable:db_assignments" ZOrder="16" X="53" Y="321" Height="275" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="228" /> + <Shape ID="DesignTable:db_testPass" ZOrder="15" X="882" Y="1176" Height="122" Width="211" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="75" /> + <Shape ID="DesignTable:db_version" ZOrder="2" X="321" Y="1173" Height="190" Width="262" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="143" /> + <Shape ID="DesignTable:db_roleProductUser" ZOrder="9" X="52" Y="835" Height="156" Width="255" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="109" /> + <Shape ID="DesignTable:db_roleProduct" ZOrder="8" X="54" Y="1019" Height="105" Width="231" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="58" /> + <Shape ID="DesignTable:db_roleUserProduct" ZOrder="6" X="323" Y="850" Height="190" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="109" /> + <Shape ID="DesignTable:db_roleRight" ZOrder="4" X="660" Y="669" Height="190" Width="216" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="109" /> + <Shape ID="DesignTable:db_userRights" ZOrder="14" X="908" Y="684" Height="207" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="160" /> + <Shape ID="DesignTable:db_rightRole" ZOrder="7" X="651" Y="881" Height="139" Width="217" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="92" /> + <Shape ID="DesignTable:db_role" ZOrder="13" X="51" Y="665" Height="139" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="92" /> + <Shape ID="DesignTable:db_users" ZOrder="12" X="54" Y="33" Height="258" Width="201" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="211" /> + <Shape ID="DesignTable:db_config" ZOrder="11" X="549" Y="37" Height="156" Width="200" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="109" /> + <Shape ID="DesignTable:db_rights" ZOrder="10" X="330" Y="667" Height="156" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="109" /> + <Shape ID="DesignTable:db_platform" ZOrder="5" X="72" Y="1446" Height="173" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="126" /> + <Shape ID="DesignTable:db_build" ZOrder="1" X="604" Y="1174" Height="156" Width="247" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="109" /> </Shapes> <Connectors /> </DiagramLayout> \ No newline at end of file Modified: Website/Includes/AdministrationTree.ascx.cs =================================================================== --- Website/Includes/AdministrationTree.ascx.cs 2006-08-11 14:16:29 UTC (rev 307) +++ Website/Includes/AdministrationTree.ascx.cs 2006-08-11 18:37:56 UTC (rev 308) @@ -45,6 +45,7 @@ if (index >= 0) nodes.RemoveAt(index); } + protected void BuildProductList(TreeNode parent) { ArrayList nodes = (ArrayList)Session["AdminNodes"]; @@ -81,9 +82,8 @@ ArrayList nodes = (ArrayList)Session["AdminNodes"]; TreeNode newNode; - // Add Admin Settings - if (Constants.IS_DEV_ENV) + if (m_user.HasRight(Constants.RIGHTS_PREFERENCE_VIEW_OTHER)) { newNode = new TreeNode(); newNode.Text = "Site Settings"; @@ -97,25 +97,31 @@ } // Users - newNode = new TreeNode(); - newNode.Text = "Users"; - newNode.Value = "users"; - newNode.PopulateOnDemand = true; - newNode.SelectAction = TreeNodeSelectAction.Expand; - parent.ChildNodes.Add(newNode); - if (nodes.Contains(newNode.ValuePath)) - newNode.Expand(); + if (m_user.HasRight(Constants.RIGHTS_USER_VIEW_OTHER)) + { + newNode = new TreeNode(); + newNode.Text = "Users"; + newNode.Value = "users"; + newNode.PopulateOnDemand = true; + newNode.SelectAction = TreeNodeSelectAction.Expand; + parent.ChildNodes.Add(newNode); + if (nodes.Contains(newNode.ValuePath)) + newNode.Expand(); + } // Roles - newNode = new TreeNode(); - newNode.Text = "User Roles"; - newNode.Value = "roles"; - newNode.PopulateOnDemand = true; - newNode.SelectAction = TreeNodeSelectAction.Expand; - newNode.NavigateUrl = "~/AdminRole.aspx?" + Constants.CODE_PRODUCT + "=" + parent.Value; - parent.ChildNodes.Add(newNode); - if (nodes.Contains(newNode.ValuePath)) - newNode.Expand(); + if (m_user.HasRight(Constants.RIGHTS_ROLE_VIEW_OTHER)) + { + newNode = new TreeNode(); + newNode.Text = "User Roles"; + newNode.Value = "roles"; + newNode.PopulateOnDemand = true; + newNode.SelectAction = TreeNodeSelectAction.Expand; + newNode.NavigateUrl = "~/AdminRole.aspx?" + Constants.CODE_PRODUCT + "=" + parent.Value; + parent.ChildNodes.Add(newNode); + if (nodes.Contains(newNode.ValuePath)) + newNode.Expand(); + } // Rights if (m_user.HasRight(Constants.RIGHTS_DEV_ACCESS)) @@ -130,7 +136,7 @@ newNode.Expand(); } - if (Constants.IS_DEV_ENV) + if (m_user.HasRight(Constants.RIGHTS_DEV_ACCESS)) { // Operating Systems newNode = new TreeNode(); @@ -151,15 +157,15 @@ parent.ChildNodes.Add(newNode); if (nodes.Contains(newNode.ValuePath)) newNode.Expand(); - } // end non-production + } } protected void BuildReleaseList(TreeNode parent) { int productID = Convert.ToInt32(parent.Parent.Value); ArrayList nodes = (ArrayList)Session["AdminNodes"]; - List<ProductVersion> versions = VersionDB.GetVersionList(productID, active); + List<Release> versions = VersionDB.GetVersionList(productID, active); - foreach (ProductVersion version in versions) + foreach (Release version in versions) { // Create the new node. TreeNode newNode = new TreeNode(); @@ -217,11 +223,12 @@ protected void BuildCategoryList(TreeNode parent) { ArrayList nodes = (ArrayList)Session["AdminNodes"]; + int productID = Convert.ToInt32(parent.Value); TreeNode newNode; - // Versions - if (m_user.HasRight(Constants.RIGHTS_DEV_ACCESS)) + if (m_user.HasRight(Constants.RIGHTS_VERSION_VIEW, productID)) { + // Versions newNode = new TreeNode(); newNode.Text = "Releases"; newNode.Value = "release"; @@ -230,7 +237,10 @@ parent.ChildNodes.Add(newNode); if (nodes.Contains(newNode.ValuePath)) newNode.Expand(); + } + if (m_user.HasRight(Constants.RIGHTS_DEV_ACCESS)) + { // Tags newNode = new TreeNode(); newNode.Text = "Tags"; @@ -260,18 +270,21 @@ parent.ChildNodes.Add(newNode); if (nodes.Contains(newNode.ValuePath)) newNode.Expand(); - } // end non-production + } // Users - newNode = new TreeNode(); - newNode.Text = "Users"; - newNode.Value = "user"; - newNode.PopulateOnDemand = true; - newNode.SelectAction = TreeNodeSelectAction.Expand; - newNode.NavigateUrl = "~/AdminRole.aspx?" + Constants.CODE_PRODUCT + "=" + parent.Value; - parent.ChildNodes.Add(newNode); - if (nodes.Contains(newNode.ValuePath)) - newNode.Expand(); + if (m_user.HasRight(Constants.RIGHTS_USER_VIEW_OTHER, productID)) + { + newNode = new TreeNode(); + newNode.Text = "Users"; + newNode.Value = "user"; + newNode.PopulateOnDemand = true; + newNode.SelectAction = TreeNodeSelectAction.Expand; + newNode.NavigateUrl = "~/AdminRole.aspx?" + Constants.CODE_PRODUCT + "=" + parent.Value; + parent.ChildNodes.Add(newNode); + if (nodes.Contains(newNode.ValuePath)) + newNode.Expand(); + } } protected void BuildStatusGroupList(TreeNode parent) { @@ -472,36 +485,46 @@ { ArrayList nodes = (ArrayList)Session["AdminNodes"]; TreeNode newNode; + int productID = Convert.ToInt32(parent.Parent.Parent.Value); - // Test Pass - newNode = new TreeNode(); - newNode.Text = "Test Passes"; - newNode.Value = "testpass"; - newNode.PopulateOnDemand = true; - newNode.SelectAction = TreeNodeSelectAction.Expand; - parent.ChildNodes.Add(newNode); - if (nodes.Contains(newNode.ValuePath)) - newNode.Expand(); + if (m_user.HasRight(Constants.RIGHTS_TESTPASS_VIEW, productID)) + { + // Test Pass + newNode = new TreeNode(); + newNode.Text = "Test Passes"; + newNode.Value = "testpass"; + newNode.PopulateOnDemand = true; + newNode.SelectAction = TreeNodeSelectAction.Expand; + parent.ChildNodes.Add(newNode); + if (nodes.Contains(newNode.ValuePath)) + newNode.Expand(); + } - // Builds - newNode = new TreeNode(); - newNode.Text = "Builds"; - newNode.Value = "build"; - newNode.PopulateOnDemand = true; - newNode.SelectAction = TreeNodeSelectAction.Expand; - parent.ChildNodes.Add(newNode); - if (nodes.Contains(newNode.ValuePath)) - newNode.Expand(); + if (m_user.HasRight(Constants.RIGHTS_BUILD_VIEW, productID)) + { + // Builds + newNode = new TreeNode(); + newNode.Text = "Builds"; + newNode.Value = "build"; + newNode.PopulateOnDemand = true; + newNode.SelectAction = TreeNodeSelectAction.Expand; + parent.ChildNodes.Add(newNode); + if (nodes.Contains(newNode.ValuePath)) + newNode.Expand(); + } - // Systems - newNode = new TreeNode(); - newNode.Text = "Supported Systems"; - newNode.Value = "system"; - newNode.PopulateOnDemand = true; - newNode.SelectAction = TreeNodeSelectAction.Expand; - parent.ChildNodes.Add(newNode); - if (nodes.Contains(newNode.ValuePath)) - newNode.Expand(); + if (m_user.HasRight(Constants.RIGHTS_DEV_ACCESS)) + { + // Systems + newNode = new TreeNode(); + newNode.Text = "Supported Systems"; + newNode.Value = "system"; + newNode.PopulateOnDemand = true; + newNode.SelectAction = TreeNodeSelectAction.Expand; + parent.ChildNodes.Add(newNode); + if (nodes.Contains(newNode.ValuePath)) + newNode.Expand(); + } } protected void BuildStatusList(TreeNode parent) { @@ -569,7 +592,6 @@ } */ } - protected void BuildRightsList(TreeNode parent) { ArrayList nodes = (ArrayList)Session["AdminNodes"]; @@ -597,39 +619,27 @@ newNode.Expand(); } } - protected void BuildBuildList(TreeNode parent) { ArrayList nodes = (ArrayList)Session["AdminNodes"]; - /* - // Populate Builds - query = "SELECT * FROM build where versionID=" + e.Node.Parent.Value; - DBAdapter = new SqlDataAdapter(query, DBConnection); - DBAdapter.Fill(ResultsDataSet); + int versionID = Convert.ToInt32(parent.Parent.Value); + List<Build> builds = VersionDB.GetBuildList(versionID, active); - if (ResultsDataSet.Tables.Count > 0) - { - foreach (DataRow row in ResultsDataSet.Tables[0].Rows) - { - // Create the new node. - newNode = new TreeNode(); - newNode.Text = "<build>" + row["number"] + "</build>"; - newNode.Value = row["buildID"].ToString(); + foreach (Build build in builds) + { + // Create the new node. + TreeNode newNode = new TreeNode(); + newNode.Text = build.NUMBER; + newNode.Value = build.ID.ToString(); + newNode.PopulateOnDemand = true; + newNode.SelectAction = TreeNodeSelectAction.Expand; + newNode.NavigateUrl = "~/Build.aspx?"+Constants.CODE_BUILD+"=" + newNode.Value; + if (!build.ACTIVE) + newNode.Text = "<font class='deleted'>" + newNode.Text + "</font>"; - // Set the PopulateOnDemand property to true so that the child nodes can be - // dynamically populated. - newNode.PopulateOnDemand = true; - - // Set additional properties for the node. - newNode.SelectAction = TreeNodeSelectAction.Expand; - newNode.NavigateUrl = "~/BuildEdit.aspx?id=" + newNode.Value; - - // Add the new node to the ChildNodes collection of the parent node. - e.Node.ChildNodes.Add(newNode); - newNode.Expand(); - } - } - */ + parent.ChildNodes.Add(newNode); + newNode.Expand(); + } } protected void BuildTestPassList(TreeNode parent) { Modified: Website/Includes/Builds.ascx =================================================================== --- Website/Includes/Builds.ascx 2006-08-11 14:16:29 UTC (rev 307) +++ Website/Includes/Builds.ascx 2006-08-11 18:37:56 UTC (rev 308) @@ -176,13 +176,12 @@ </UpdateParameters> <SelectParameters> <asp:SessionParameter Name="active" SessionField="active" Type="Boolean" /> - <asp:Parameter Name="versionID" Type="Boolean" /> - <asp:SessionParameter Name="buildID" SessionField="id" Type="Int32" /> + <asp:Parameter Name="versionID" Type="Int32" /> + <asp:SessionParameter Name="buildID" SessionField="buildID" Type="Int32" /> </SelectParameters> <InsertParameters> <asp:Parameter Name="versionID" Type="Int32" /> <asp:Parameter Name="number" Type="String" /> - <asp:Parameter Name="active" Type="Boolean" /> </InsertParameters> </asp:ObjectDataSource> <asp:ObjectDataSource ID="VersionDataSource" runat="server" OldValuesParameterFormatString="original_{0}" Modified: Website/Includes/Builds.ascx.cs =================================================================== --- Website/Includes/Builds.ascx.cs 2006-08-11 14:16:29 UTC (rev 307) +++ Website/Includes/Builds.ascx.cs 2006-08-11 18:37:56 UTC (rev 308) @@ -10,25 +10,32 @@ using System.Collections.Generic; using TCDB.Code; - namespace TCDB { public partial class Builds : SiteUserControl { private static Logger m_logg = new Logger("TCDB.Authenticate"); - String id = HttpContext.Current.Request.QueryString["id"]; - String mode = HttpContext.Current.Request.QueryString["mode"]; - String version = HttpContext.Current.Request.QueryString["version"]; + int buildID = Convert.ToInt32(HttpContext.Current.Request.QueryString[Constants.CODE_BUILD]); + Build build; + + String mode = HttpContext.Current.Request.QueryString[Constants.CODE_MODE]; + int version = Convert.ToInt32(HttpContext.Current.Request.QueryString[Constants.CODE_VERSION]); + void Page_Load(Object sender, EventArgs e) { if (!m_user.HasRight(Constants.RIGHTS_DEV_ACCESS)) Response.Redirect("~/Administration.aspx"); - - if (id == null) - Response.Redirect("Admin.aspx"); - Session.Add("id", id); + if (buildID == 0 && mode == null) + { + m_logg.Info("Could not find build. Redirecting"); + Response.Redirect("~/Administration.aspx"); + } + + build = VersionDB.GetBuild(buildID); + Session.Add("buildID", buildID); + //if (mode != null && mode == "new") // FormView1.ChangeMode(FormViewMode.Insert); Modified: Website/Includes/FeaturesTree.ascx.cs =================================================================== --- Website/Includes/FeaturesTree.ascx.cs 2006-08-11 14:16:29 UTC (rev 307) +++ Website/Includes/FeaturesTree.ascx.cs 2006-08-11 18:37:56 UTC (rev 308) @@ -75,9 +75,9 @@ { int productID = Convert.ToInt32(parent.Value); ArrayList nodes = (ArrayList)Session["TreeNodes"]; - List<ProductVersion> versions = VersionDB.GetVersionList(productID, active); + List<Release> versions = VersionDB.GetVersionList(productID, active); - foreach (ProductVersion version in versions) + foreach (Release version in versions) { // Create the new node. TreeNode newNode = new TreeNode(); Modified: Website/Includes/Products.ascx.cs =================================================================== --- Website/Includes/Products.ascx.cs 2006-08-11 14:16:29 UTC (rev 307) +++ Website/Includes/Products.ascx.cs 2006-08-11 18:37:56 UTC (rev 308) @@ -57,50 +57,6 @@ product = ProductDB.GetProduct(productID); } - protected void updateUserRoleProducts() - { - DropDownList roleList = (DropDownList)ProductsView.FindControl("roleList"); - ListBox userList = (ListBox)ProductsView.FindControl("userList"); - Dictionary<String, ArrayList> RoleUsers = (Dictionary<String, ArrayList>)Session["RoleUsers"]; - if (RoleUsers == null) - return; - tcdbDataSetTableAdapters.db_roleUserProductTableAdapter rupAdapter = new tcdbDataSetTableAdapters.db_roleUserProductTableAdapter(); - - // Update ProductUsers - int[] indices = userList.GetSelectedIndices(); - ArrayList users = new ArrayList(); - foreach (int index in indices) - users.Add(userList.Items[index].Value); - if (RoleUsers.ContainsKey(roleList.SelectedValue)) - RoleUsers[roleList.SelectedValue] = users; - - foreach (ListItem role in roleList.Items) - { - /* - String productID = item.Value; - - // Clear list - rupAdapter.upd_userRoleProduct(null,null,Convert.ToInt32(productID),false); - - // update ProductUser roles - if (ProductUsers.ContainsKey(productID)) - { - foreach (String userID in ProductUsers[productID]) - rupAdapter.ins_userRoleProduct(Convert.ToInt32(userID),roleID,Convert.ToInt32(productID)); - } - */ - int roleID = Convert.ToInt32(role.Value); - foreach (ListItem user in userList.Items) - { - int userID = Convert.ToInt32(user.Value); - - if (RoleUsers.ContainsKey(roleID.ToString()) && RoleUsers[roleID.ToString()].Contains(userID.ToString())) - rupAdapter.ins_userRoleProduct(userID, roleID, productID); - else - rupAdapter.upd_userRoleProduct(userID, roleID, productID, false); - } - } - } protected void deleteCmd(object sender, CommandEventArgs e) { tcdbDataSetTableAdapters.db_productsTableAdapter pAdapter = new tcdbDataSetTableAdapters.db_productsTableAdapter(); @@ -120,14 +76,13 @@ { productID = product.ID; - updateUserRoleProducts(); + m_user.AddRole("Administrator", productID); Response.Redirect("Product.aspx?" + Constants.CODE_PRODUCT + "=" + productID); } } } protected void ProductsView_ItemUpdated(object sender, FormViewUpdatedEventArgs e) { - updateUserRoleProducts(); Response.Redirect("Product.aspx?" + Constants.CODE_PRODUCT + "=" + productID); } protected void ProductsView_ItemCommand(object sender, FormViewCommandEventArgs e) @@ -187,9 +142,9 @@ { LinkButton deleteBtn = (LinkButton)sender; Label deleteLbl = (Label)ProductsView.FindControl("deleteLbl"); - Label activeLbl = (Label)ProductsView.FindControl("activeLbl"); + Label activeLbl = (Label)ProductsView.FindControl("activeLbl"); - if (mode == "read" || activeLbl.Visible || (!m_user.HasRight(Constants.RIGHTS_PRODUCT_DELETE,productID))) + if (mode == "read" || activeLbl.Visible || (!m_user.HasRight(Constants.RIGHTS_PRODUCT_DELETE, productID))) { deleteBtn.Visible = false; deleteLbl.Visible = false; @@ -227,6 +182,7 @@ } } } + protected void activeBox_Init(object sender, EventArgs e) { CheckBox activeBox = (CheckBox)sender; @@ -255,6 +211,7 @@ Response.Redirect(Request.RawUrl); } } + protected void ProductsView_DataBound(object sender, EventArgs e) { CheckBox activeBox = (CheckBox)ProductsView.FindControl("activeBox"); Modified: Website/Includes/Rights.ascx =================================================================== --- Website/Includes/Rights.ascx 2006-08-11 14:16:29 UTC (rev 307) +++ Website/Includes/Rights.ascx 2006-08-11 18:37:56 UTC (rev 308) @@ -68,7 +68,8 @@ <div class="xboxcontent"> <div class="ct"> <div class="item"> - <label> + <asp:CheckBox ID="Active" runat="server" Checked='<%# Bind("active") %>' Enabled="False" + Visible="False" /><label> Name:</label> <asp:TextBox ID="nameLabel" runat="server" Text='<%# Bind("rightsName") %>' Width="400"></asp:TextBox></div> <div class="item"> Modified: Website/Includes/Rights.ascx.cs =================================================================== --- Website/Includes/Rights.ascx.cs 2006-08-11 14:16:29 UTC (rev 307) +++ Website/Includes/Rights.ascx.cs 2006-08-11 18:37:56 UTC (rev 308) @@ -126,7 +126,10 @@ if (FormView1.CurrentMode != FormViewMode.Insert && row != null) activeBox.Checked = Convert.ToBoolean(row["active"]); else + { activeBox.Enabled = false; + activeBox.Checked = true; + } } protected void roleList_Init(object sender, EventArgs e) { Modified: Website/Includes/RoleAssignments.ascx.cs =================================================================== --- Website/Includes/RoleAssignments.ascx.cs 2006-08-11 14:16:29 UTC (rev 307) +++ Website/Includes/RoleAssignments.ascx.cs 2006-08-11 18:37:56 UTC (rev 308) @@ -104,9 +104,17 @@ { List<Product> products = ProductDB.GetProductList(active); foreach (Product product in products) + { if (m_user.HasRight(Constants.RIGHTS_ROLE_EDIT_USERS, product.ID)) - productList.Items.Add(new ListItem(product.NAME, product.ID.ToString())); + { + ListItem item = new ListItem(product.NAME, product.ID.ToString()); + if (!product.ACTIVE) + item.Attributes.CssStyle.Add("text-decoration", "line-through"); + productList.Items.Add(item); + } + } + // Set selected value if (productList.Items.FindByValue(productID.ToString()) != null && m_user.HasRight(Constants.RIGHTS_ROLE_EDIT_USERS, productID)) productList.SelectedValue = productID.ToString(); Modified: Website/Includes/UserRoles.ascx.cs =================================================================== --- Website/Includes/UserRoles.ascx.cs 2006-08-11 14:16:29 UTC (rev 307) +++ Website/Includes/UserRoles.ascx.cs 2006-08-11 18:37:56 UTC (rev 308) @@ -49,7 +49,11 @@ if (mode == "new" && m_user.HasRight(Constants.RIGHTS_ROLE_CREATE, Constants.PRODUCT_ANYID)) UserRoleView.ChangeMode(FormViewMode.Insert); - else if (mode == "edit" && (m_user.HasRight(Constants.RIGHTS_ROLE_EDIT, Constants.PRODUCT_ANYID) || m_user.HasRight(Constants.RIGHTS_ROLE_EDIT_USERS, Constants.PRODUCT_ANYID))) + else if (mode == "edit" && + (m_user.HasRight(Constants.RIGHTS_ROLE_EDIT, Constants.PRODUCT_ANYID) || + m_user.HasRight(Constants.RIGHTS_ROLE_EDIT_USERS, Constants.PRODUCT_ANYID)) + // TODO: change this to user build-in attribute when implemented + && (role.ID != Constants.ROLE_ADMIN && role.ID != Constants.ROLE_BASIC_USER || m_user.HasRight("dev_access"))) UserRoleView.ChangeMode(FormViewMode.Edit); } @@ -143,6 +147,8 @@ protected void EditAssignments_Command(object sender, CommandEventArgs e) { + if (productID == null) + productID = Constants.PRODUCT_SITEID.ToString(); Response.Redirect("~/RoleAssignments.aspx?" + Constants.CODE_PRODUCT + "=" + productID + "&" + Constants.CODE_ROLE + "=" + roleID); } protected void NewRight_Init(object sender, EventArgs e) @@ -207,7 +213,10 @@ LinkButton editBtn = (LinkButton)sender; Label editLbl = (Label)UserRoleView.FindControl("NewLbl"); - if (!m_user.HasRight(Constants.RIGHTS_ROLE_EDIT, Constants.PRODUCT_ANYID) && !m_user.HasRight(Constants.RIGHTS_ROLE_EDIT_USERS, Constants.PRODUCT_ANYID)) + if (!m_user.HasRight(Constants.RIGHTS_ROLE_EDIT, Constants.PRODUCT_ANYID) && + !m_user.HasRight(Constants.RIGHTS_ROLE_EDIT_USERS, Constants.PRODUCT_ANYID) && + // TODO: change this to user build-in attribute when implemented + !(m_user.HasRight("dev_access") || role.ID != Constants.ROLE_ADMIN && role.ID != Constants.ROLE_BASIC_USER)) { editBtn.Visible = false; editLbl.Visible = false; @@ -235,7 +244,7 @@ editBtn.Visible = false; newLbl.Visible = false; } - } + } } protected void ActiveBox_Init(object sender, EventArgs e) @@ -260,8 +269,8 @@ } else { - tcdbDataSetTableAdapters.db_roleTableAdapter rAdapter = new tcdbDataSetTableAdapters.db_roleTableAdapter(); - rAdapter.Update(role.ID, role.NAME, role.DESCRIPTION, activeBox.Checked); + tcdbDataSetTableAdapters.db_roleTableAdapter rAdapter = new tcdbDataSetTableAdapters.db_roleTableAdapter(); + rAdapter.Update(role.ID, role.NAME, role.DESCRIPTION, activeBox.Checked); Response.Redirect(Request.RawUrl); } @@ -307,10 +316,10 @@ ListBox assigned = (ListBox)UserRoleView.FindControl("AssignedList"); int[] indices = unassigned.GetSelectedIndices(); - for (int index = indices.Length-1; index >= 0; index--) + for (int index = indices.Length - 1; index >= 0; index--) { ListItem item = unassigned.Items[indices[index]]; - + unassigned.Items.Remove(item); assigned.Items.Add(item); item.Selected = false; @@ -322,7 +331,7 @@ ListBox assigned = (ListBox)UserRoleView.FindControl("AssignedList"); int[] indices = assigned.GetSelectedIndices(); - for (int index = indices.Length-1; index >= 0; index--) + for (int index = indices.Length - 1; index >= 0; index--) { ListItem item = assigned.Items[indices[index]]; @@ -348,11 +357,11 @@ if (rightsList.Text != "") rightsList.Text += ", "; if (!right.ACTIVE) - rightsList.Text += "<font class='deleted'>"+ right.NAME +"</font>"; + rightsList.Text += "<font class='deleted'>" + right.NAME + "</font>"; else rightsList.Text += right.NAME; } } + } } -} Modified: Website/Includes/UserSettings.ascx.cs =================================================================== --- Website/Includes/UserSettings.ascx.cs 2006-08-11 14:16:29 UTC (rev 307) +++ Website/Includes/UserSettings.ascx.cs 2006-08-11 18:37:56 UTC (rev 308) @@ -355,23 +355,23 @@ ProductRoles.Clear(); // Get products - List<Product> products = ProductDB.GetProductList(active); + List<Product> products = ProductDB.GetProductList(active); - foreach (Product product in products) + foreach (Product product in products) { - if ((userID == m_user.ID && m_user.HasRight(Constants.RIGHTS_ROLE_VIEW_MY, product.ID)) || - (userID != m_user.ID && m_user.HasRight(Constants.RIGHTS_ROLE_VIEW_OTHER, product.ID))) + if ((userID == m_user.ID && m_user.HasRight(Constants.RIGHTS_ROLE_VIEW_MY, product.ID)) || + (userID != m_user.ID && m_user.HasRight(Constants.RIGHTS_ROLE_VIEW_OTHER, product.ID))) { // Get Roles tcdbDataSetTableAdapters.db_roleUserProductTableAdapter rupAdapter = new tcdbDataSetTableAdapters.db_roleUserProductTableAdapter(); - tcdbDataSet.db_roleUserProductDataTable rupTable = rupAdapter.GetData(userID, product.ID, true); + tcdbDataSet.db_roleUserProductDataTable rupTable = rupAdapter.GetData(userID, product.ID, true); ArrayList roles = new ArrayList(); foreach (tcdbDataSet.db_roleUserProductRow rupRow in rupTable) roles.Add(rupRow.roleName); if (roles.Count > 0) - ProductRoles[product.NAME] = roles; + ProductRoles[product.NAME] = roles; } } Modified: Website/Includes/Versions.ascx =================================================================== --- Website/Includes/Versions.ascx 2006-08-11 14:16:29 UTC (rev 307) +++ Website/Includes/Versions.ascx 2006-08-11 18:37:56 UTC (rev 308) @@ -46,7 +46,7 @@ <asp:Label ID="productName" runat="server" Text='<%# Eval("productName") %>'></asp:Label></td> <td align="left" colspan="2" valign="top"> <strong>Platforms: </strong><br /> - <asp:ListBox ID="platformList" runat="server"></asp:ListBox> + <asp:ListBox ID="platformList" runat="server" Height="150px" Width="150px"></asp:ListBox> </td> </tr> <tr> @@ -101,7 +101,7 @@ </td> <td align="left" colspan="2" valign="top"> <strong>Platform:</strong><br /> - <asp:ListBox ID="platformList" runat="server" OnDataBound="platformList_DataBound" SelectionMode="Multiple" OnInit="platformList_Init"> + <asp:ListBox ID="platformList" runat="server" OnDataBound="platformList_DataBound" SelectionMode="Multiple" OnInit="platformList_Init" Height="150px" Width="150px"> </asp:ListBox> </td> </tr> <tr> @@ -194,7 +194,6 @@ <asp:Parameter Name="productID" Type="Int32" /> <asp:Parameter Name="number" Type="String" /> <asp:Parameter Name="code" Type="String" /> - <asp:Parameter Name="active" Type="Boolean" /> </InsertParameters> </asp:ObjectDataSource> <asp:ObjectDataSource ID="ProductsDataSource" runat="server" OldValuesParameterFormatString="original_{0}" Modified: Website/Includes/Versions.ascx.cs =================================================================== --- Website/Includes/Versions.ascx.cs 2006-08-11 14:16:29 UTC (rev 307) +++ Website/Includes/Versions.ascx.cs 2006-08-11 18:37:56 UTC (rev 308) @@ -10,7 +10,6 @@ using System.Collections.Generic; using TCDB.Code; - namespace TCDB { public partial class Versions : SiteUserControl @@ -32,6 +31,10 @@ Response.Redirect("TestManagement.aspx"); } } + + // Check rights + + Session.Add("versionID", versionID); if (mode == "new") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |