Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
Fixed visual display of Role hirearchy to produce diagram when Role i…
Browse files Browse the repository at this point in the history
…sn't connected to any other role
  • Loading branch information
sfc-gh-dodievich committed Oct 12, 2021
1 parent d276a30 commit d957f82
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/net5.0/SFGrantReport.dll",
"args": ["-l", "C:\\snowflake\\SnowflakeGrantReport\\Reports\\aws_cas1", "-r", "C:\\snowflake\\SnowflakeGrantReport\\Reports\\aws_cas1.offline.08192021", "-o", "C:\\snowflake\\SnowflakeGrantReport\\Reports\\aws_cas1.offline.08192021.compare" ],
//"args": ["-i", "C:\\snowflake\\GrantReport\\ACCOUNT_USAGE_INPUT\\", "-o", "C:\\snowflake\\GrantReport\\Reports\\something"],
//"args": ["-l", "C:\\snowflake\\SnowflakeGrantReport\\Reports\\aws_cas1", "-r", "C:\\snowflake\\SnowflakeGrantReport\\Reports\\aws_cas1.offline.08192021", "-o", "C:\\snowflake\\SnowflakeGrantReport\\Reports\\aws_cas1.offline.08192021.compare" ],
//"args": ["-i", "C:\\snowflake\\GrantReport\\ACCOUNT_USAGE_INPUT\\", "-o", "C:\\snowflake\\SnowflakeGrantReport\\Reports\\Avalera\\myReports", "-s"],
"args": ["-c", "sfgrantreport", "-o", "C:\\snowflake\\SnowflakeGrantReport\\Reports\\Avalera\\myReports", "-s"],
"cwd": "${workspaceFolder}",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "externalTerminal",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ public override bool Execute(ProgramOptions programOptions)
sbGraphViz.AppendLine(" // Roles");
sbGraphViz.AppendLine (" subgraph cluster_roles {");
sbGraphViz.AppendFormat(" label = \"roles related to: {0}\";", role); sbGraphViz.AppendLine();

// Add the role itself
sbGraphViz.AppendFormat(" \"{0}\"{1};", role.Name.Replace("\"", "\\\""), getRoleStyleAttribute(role)); sbGraphViz.AppendLine();
roleNamesOutput.Add(role.Name, role);

foreach (RoleHierarchy roleHierarchy in thisRoleAndItsRelationsHierarchiesList)
{
if (roleHierarchy.GrantedTo != "<NOTHING>" && roleNamesOutput.ContainsKey(roleHierarchy.GrantedTo) == false)
Expand Down
6 changes: 3 additions & 3 deletions Snowflake.GrantReport.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<AssemblyName>SFGrantReport</AssemblyName>
<RootNamespace>Snowflake.GrantReport</RootNamespace>

<Version>2021.9.1.0</Version>
<FileVersion>2021.9.1.0</FileVersion>
<AssemblyVersion>2021.9.1.0</AssemblyVersion>
<Version>2021.10.12.0</Version>
<FileVersion>2021.10.12.0</FileVersion>
<AssemblyVersion>2021.10.12.0</AssemblyVersion>
<Authors>Daniel Odievich ([email protected])</Authors>
<Company>Snowflake Computing</Company>
<Product>Snowflake Grant Report</Product>
Expand Down

0 comments on commit d957f82

Please sign in to comment.