diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-11-19 04:32:11 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-11-19 04:32:11 +0200 |
| commit | bbb32747564cc76a799bff2e24acc1621c6c74ee (patch) | |
| tree | 4d7dc4d1027593cdb4f564534d6e99f165be9596 /Software/Visual_Studio | |
| parent | 466340a97f8a158570f84fc12238101ca9c124ec (diff) | |
| download | Tango-bbb32747564cc76a799bff2e24acc1621c6c74ee.tar.gz Tango-bbb32747564cc76a799bff2e24acc1621c6c74ee.zip | |
Roles and Permission EDrawMax + csv generator + pdf.
Diffstat (limited to 'Software/Visual_Studio')
17 files changed, 297 insertions, 6 deletions
diff --git a/Software/Visual_Studio/FSE/Roles & Permissions/Administrator.csv b/Software/Visual_Studio/FSE/Roles & Permissions/Administrator.csv new file mode 100644 index 000000000..c889f448e --- /dev/null +++ b/Software/Visual_Studio/FSE/Roles & Permissions/Administrator.csv @@ -0,0 +1,2 @@ +Administrator +Manage Organization Users And Roles diff --git a/Software/Visual_Studio/FSE/Roles & Permissions/Advanced Technician.csv b/Software/Visual_Studio/FSE/Roles & Permissions/Advanced Technician.csv new file mode 100644 index 000000000..35ac5c8ae --- /dev/null +++ b/Software/Visual_Studio/FSE/Roles & Permissions/Advanced Technician.csv @@ -0,0 +1,5 @@ +Advanced Technician +Remote Desktop Control +PPC File System Read +Firmware File System Read +Remote Upgrade Online diff --git a/Software/Visual_Studio/FSE/Roles & Permissions/Roles & Permissions.eddx b/Software/Visual_Studio/FSE/Roles & Permissions/Roles & Permissions.eddx Binary files differnew file mode 100644 index 000000000..dcabc3bf9 --- /dev/null +++ b/Software/Visual_Studio/FSE/Roles & Permissions/Roles & Permissions.eddx diff --git a/Software/Visual_Studio/FSE/Roles & Permissions/Roles & Permissions.pdf b/Software/Visual_Studio/FSE/Roles & Permissions/Roles & Permissions.pdf Binary files differnew file mode 100644 index 000000000..f5bf232bd --- /dev/null +++ b/Software/Visual_Studio/FSE/Roles & Permissions/Roles & Permissions.pdf diff --git a/Software/Visual_Studio/FSE/Roles & Permissions/Technician.csv b/Software/Visual_Studio/FSE/Roles & Permissions/Technician.csv new file mode 100644 index 000000000..f4a50edef --- /dev/null +++ b/Software/Visual_Studio/FSE/Roles & Permissions/Technician.csv @@ -0,0 +1,5 @@ +Technician +Run FSE +Remote Desktop View +PPC File System Read +Remote Upgrade Offline diff --git a/Software/Visual_Studio/FSE/Roles & Permissions/Twine Administrator.csv b/Software/Visual_Studio/FSE/Roles & Permissions/Twine Administrator.csv new file mode 100644 index 000000000..42d217a67 --- /dev/null +++ b/Software/Visual_Studio/FSE/Roles & Permissions/Twine Administrator.csv @@ -0,0 +1,3 @@ +Twine Administrator +Manage All Organizations Users And Roles +Reset Machine Device Registration diff --git a/Software/Visual_Studio/FSE/Roles & Permissions/Twine Data Store Developer.csv b/Software/Visual_Studio/FSE/Roles & Permissions/Twine Data Store Developer.csv new file mode 100644 index 000000000..b1650e363 --- /dev/null +++ b/Software/Visual_Studio/FSE/Roles & Permissions/Twine Data Store Developer.csv @@ -0,0 +1,2 @@ +Twine Data Store Developer +DataStore Create diff --git a/Software/Visual_Studio/FSE/Roles & Permissions/Twine Developer.csv b/Software/Visual_Studio/FSE/Roles & Permissions/Twine Developer.csv new file mode 100644 index 000000000..93a5fae98 --- /dev/null +++ b/Software/Visual_Studio/FSE/Roles & Permissions/Twine Developer.csv @@ -0,0 +1,2 @@ +Twine Developer +DataStore Create Write Global diff --git a/Software/Visual_Studio/FSE/Roles & Permissions/Twine Procedure Designer.csv b/Software/Visual_Studio/FSE/Roles & Permissions/Twine Procedure Designer.csv new file mode 100644 index 000000000..e0bc0e9f3 --- /dev/null +++ b/Software/Visual_Studio/FSE/Roles & Permissions/Twine Procedure Designer.csv @@ -0,0 +1,2 @@ +Twine Procedure Designer +Run Procedure Designer diff --git a/Software/Visual_Studio/FSE/Roles & Permissions/Twine Procedure Publisher.csv b/Software/Visual_Studio/FSE/Roles & Permissions/Twine Procedure Publisher.csv new file mode 100644 index 000000000..42d81e75e --- /dev/null +++ b/Software/Visual_Studio/FSE/Roles & Permissions/Twine Procedure Publisher.csv @@ -0,0 +1,2 @@ +Twine Procedure Publisher +Publish Procedure Projects diff --git a/Software/Visual_Studio/FSE/Roles & Permissions/Twine Technician.csv b/Software/Visual_Studio/FSE/Roles & Permissions/Twine Technician.csv new file mode 100644 index 000000000..2b1ce91aa --- /dev/null +++ b/Software/Visual_Studio/FSE/Roles & Permissions/Twine Technician.csv @@ -0,0 +1,18 @@ +Twine Technician +Connect Any Machine +PPC File System Write +Firmware File System Write +Execute Remote Console Commands +Edit Diagnostics Project +View FSE Logs +Modify Bug Report +View Internal Published Procedures +Run Procedure Project File +Run Configuration Module +Modify Machine Provisioning +Modify Machine Update +Modify Machine Identity +Modify Machine Hardware +DataStore Read +DataStore Write +Reset Machine Counters diff --git a/Software/Visual_Studio/FSE/Tango.FSE.DPGraphGenerator/App.config b/Software/Visual_Studio/FSE/Tango.FSE.DPGraphGenerator/App.config new file mode 100644 index 000000000..4ef5218a0 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.DPGraphGenerator/App.config @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <configSections> + <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> + <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> + </configSections> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> + </startup> + <entityFramework> + <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> + <providers> + <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> + </providers> + </entityFramework> + <runtime> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + <dependentAssembly> + <assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-5.0.5.0" newVersion="5.0.5.0" /> + </dependentAssembly> + </assemblyBinding> + </runtime> +</configuration>
\ No newline at end of file diff --git a/Software/Visual_Studio/FSE/Tango.FSE.DPGraphGenerator/Program.cs b/Software/Visual_Studio/FSE/Tango.FSE.DPGraphGenerator/Program.cs new file mode 100644 index 000000000..9eb0fb7b6 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.DPGraphGenerator/Program.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL; +using Tango.BL.Entities; +using Tango.CSV; + +namespace Tango.FSE.DPGraphGenerator +{ + class Program + { + private class RolePermission + { + public String Name { get; set; } + + public override string ToString() + { + return Name; + } + } + + private class RoleModel + { + public String Name { get; set; } + public List<RolePermission> Permissions { get; set; } + + public RoleModel() + { + Permissions = new List<RolePermission>(); + } + } + + static void Main(string[] args) + { + String outputFolder = Path.GetFullPath(@"..\..\..\Roles & Permissions"); + + Console.WriteLine($"Generating roles and permissions csv files to '{outputFolder}'..."); + + List<RoleModel> models = new List<RoleModel>(); + + using (ObservablesContext db = ObservablesContext.CreateDefault()) + { + var roles = db.Roles.ToList(); + var roles_permissions = db.RolesPermissions.ToList(); + var permissions = db.Permissions.ToList(); + + foreach (var role in roles.Where(x => x.Name.Contains("FSE")).ToList()) + { + RoleModel model = new RoleModel(); + model.Name = role.Description; + + List<Permission> role_permissions = role.RolesPermissions.Select(x => x.Permission).ToList(); + + foreach (var permission in role_permissions.OrderBy(x => x.Code)) + { + model.Permissions.Add(new RolePermission() { Name = permission.Name.Replace("FSE_", "") }); + } + + models.Add(model); + } + } + + Directory.CreateDirectory(outputFolder); + + foreach (var model in models) + { + Console.WriteLine($"Generating role '{model.Name}'..."); + + using (DynamicCsvFile csvFile = new DynamicCsvFile(Path.Combine(outputFolder, $"{model.Name}.csv"))) + { + csvFile.Columns.Add(new DynamicCsvFileColumn() { Name = model.Name }); + + foreach (var permission in model.Permissions) + { + csvFile.Append(permission); + } + } + } + + Console.WriteLine(); + Console.WriteLine("Done!, press return to exit..."); + Console.ReadLine(); + } + } +} diff --git a/Software/Visual_Studio/FSE/Tango.FSE.DPGraphGenerator/Properties/AssemblyInfo.cs b/Software/Visual_Studio/FSE/Tango.FSE.DPGraphGenerator/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..4cec0e5fd --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.DPGraphGenerator/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Tango.FSE.DPGraphGenerator")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tango.FSE.DPGraphGenerator")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("c57d9d68-336c-4665-9ef4-ec1bdbb84885")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Software/Visual_Studio/FSE/Tango.FSE.DPGraphGenerator/Tango.FSE.DPGraphGenerator.csproj b/Software/Visual_Studio/FSE/Tango.FSE.DPGraphGenerator/Tango.FSE.DPGraphGenerator.csproj new file mode 100644 index 000000000..ae2b84d7c --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.DPGraphGenerator/Tango.FSE.DPGraphGenerator.csproj @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{C57D9D68-336C-4665-9EF4-EC1BDBB84885}</ProjectGuid> + <OutputType>Exe</OutputType> + <RootNamespace>Tango.FSE.DPGraphGenerator</RootNamespace> + <AssemblyName>Tango.FSE.DPGraphGenerator</AssemblyName> + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> + <Deterministic>true</Deterministic> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath> + </Reference> + <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.ComponentModel.DataAnnotations" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + <None Include="packages.config" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\Tango.BL\Tango.BL.csproj"> + <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project> + <Name>Tango.BL</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.Core\Tango.Core.csproj"> + <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> + <Name>Tango.Core</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.CSV\Tango.CSV.csproj"> + <Project>{58e8825f-0c96-449c-b320-1e82b0aa876b}</Project> + <Name>Tango.CSV</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/FSE/Tango.FSE.DPGraphGenerator/packages.config b/Software/Visual_Studio/FSE/Tango.FSE.DPGraphGenerator/packages.config new file mode 100644 index 000000000..b3daf0d6c --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.DPGraphGenerator/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="EntityFramework" version="6.2.0" targetFramework="net461" /> +</packages>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.sln b/Software/Visual_Studio/Tango.sln index f163b37ab..2c0063d78 100644 --- a/Software/Visual_Studio/Tango.sln +++ b/Software/Visual_Studio/Tango.sln @@ -437,6 +437,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.DataStore.CLI", "Data EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.DataStore.Web", "DataStore\Tango.DataStore.Web\Tango.DataStore.Web.csproj", "{A9828548-AF43-4CE4-8B13-50E99F9C9CF7}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.FSE.DPGraphGenerator", "FSE\Tango.FSE.DPGraphGenerator\Tango.FSE.DPGraphGenerator.csproj", "{C57D9D68-336C-4665-9EF4-EC1BDBB84885}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -4124,6 +4126,26 @@ Global {A9828548-AF43-4CE4-8B13-50E99F9C9CF7}.Release|x64.Build.0 = Release|Any CPU {A9828548-AF43-4CE4-8B13-50E99F9C9CF7}.Release|x86.ActiveCfg = Release|Any CPU {A9828548-AF43-4CE4-8B13-50E99F9C9CF7}.Release|x86.Build.0 = Release|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Debug|ARM.ActiveCfg = Debug|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Debug|ARM.Build.0 = Debug|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Debug|ARM64.Build.0 = Debug|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Debug|x64.ActiveCfg = Debug|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Debug|x64.Build.0 = Debug|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Debug|x86.ActiveCfg = Debug|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Debug|x86.Build.0 = Debug|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Release|Any CPU.Build.0 = Release|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Release|ARM.ActiveCfg = Release|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Release|ARM.Build.0 = Release|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Release|ARM64.ActiveCfg = Release|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Release|ARM64.Build.0 = Release|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Release|x64.ActiveCfg = Release|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Release|x64.Build.0 = Release|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Release|x86.ActiveCfg = Release|Any CPU + {C57D9D68-336C-4665-9EF4-EC1BDBB84885}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -4275,14 +4297,15 @@ Global {EE088FF7-04D1-41FB-9D6A-CEDEEE7A7B9C} = {3F723D53-3539-42D1-8570-395BF660928D} {6189B8C3-7AF9-43DD-8A61-A8A05F526F62} = {3F723D53-3539-42D1-8570-395BF660928D} {A9828548-AF43-4CE4-8B13-50E99F9C9CF7} = {3F723D53-3539-42D1-8570-395BF660928D} + {C57D9D68-336C-4665-9EF4-EC1BDBB84885} = {004337EB-0761-4D30-B9F5-AE6E1CFC6013} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {7986F7F4-A86A-4994-B1B6-0988D7F057B6} - BuildVersion_BuildVersioningStyle = None.None.Increment.DeltaBaseYearDayOfYear - BuildVersion_UpdateAssemblyVersion = True - BuildVersion_UpdateFileVersion = False - BuildVersion_StartDate = 2000/1/1 - BuildVersion_AssemblyInfoFilename = Properties\AssemblyInfo.cs BuildVersion_UseGlobalSettings = False + BuildVersion_AssemblyInfoFilename = Properties\AssemblyInfo.cs + BuildVersion_StartDate = 2000/1/1 + BuildVersion_UpdateFileVersion = False + BuildVersion_UpdateAssemblyVersion = True + BuildVersion_BuildVersioningStyle = None.None.Increment.DeltaBaseYearDayOfYear + SolutionGuid = {7986F7F4-A86A-4994-B1B6-0988D7F057B6} EndGlobalSection EndGlobal |
