Skip to content

Commit

Permalink
fix:permission 403 (#685)
Browse files Browse the repository at this point in the history
* fix:permission 403

* reactor: Remove OwningComponentBase
  • Loading branch information
wzh425 committed Mar 15, 2024
1 parent 8acc5ff commit caf6f64
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/Masa.Stack.Components/Shared/Layouts/SLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
@inject GlobalConfig GlobalConfig
@inject IAuthClient AuthClient
@inject ILogger<SLayout> Logger
@inherits OwningComponentBase<IMultiEnvironmentUserContext>

<CascadingValue Value="this" IsFixed>
<CascadingValue Value="@I18n.Culture.ToString()" Name="Culture">
Expand Down
5 changes: 4 additions & 1 deletion src/Masa.Stack.Components/Shared/Layouts/SLayout.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public partial class SLayout
[Inject]
private IMultiEnvironmentMasaStackConfig MultiEnvironmentMasaStackConfig { get; set; } = null!;

[Inject]
private IMultiEnvironmentUserContext MultiEnvironmentUserContext { get; set; } = null!;

[Inject]
public JsInitVariables JsInitVariables { get; set; } = default!;

Expand Down Expand Up @@ -79,7 +82,7 @@ public partial class SLayout
[Parameter]
public string? AppId { get; set; }

public string GetAppId() => MultiEnvironmentMasaStackConfig.SetEnvironment(Service.Environment ?? "").GetWebId(ProjectApp.Project);
public string GetAppId() => MultiEnvironmentMasaStackConfig.SetEnvironment(MultiEnvironmentUserContext.Environment ?? "").GetWebId(ProjectApp.Project);

List<Nav> NavItems = new();
List<string> _preWhiteUris = new();
Expand Down
4 changes: 2 additions & 2 deletions tests/MasaWebApp/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"MASA_NAMESPACE": "masastack.com",
"MASA_CLUSTER": "Default",
"OTLP_URL": "https://otel-collector.masastack:9013",
"REDIS": "{\"RedisHost\": \"10.130.0.235\", \"RedisPort\": 24615, \"RedisDb\": 0,\"RedisPassword\": \"Hzss@123\"}",
"CONNECTIONSTRING": "{\"Server\": \"10.175.171.201\", \"Port\": 32679,\"Database\":\"pm-dev\",\"UserId\": \"ss\",\"Password\":\"Hzss@123\"}",
"REDIS": "{\"RedisHost\": \"10.130.0.19\", \"RedisPort\": 2135, \"RedisDb\": 3,\"RedisPassword\": \"Hzss@123\"}",
"CONNECTIONSTRING": "{\"Server\": \"10.130.0.19\", \"Port\": 2415,\"Database\":\"pm-dev\",\"UserId\": \"ss\",\"Password\":\"Hzss@123\"}",
"MASA_STACK": "[{\"id\":\"pm\",\"name\":\"PM\",\"service\":{\"name\":\"PM.Service\",\"id\":\"pm-service\",\"domain\":\"http://pm-service-develop.masastack.com\"},\"web\":{\"name\":\"PM.Web\",\"id\":\"pm-web\",\"domain\":\"\"}},{\"id\":\"dcc\",\"name\":\"DCC\",\"service\":{\"name\":\"Dcc.Service\",\"id\":\"dcc-service\",\"domain\":\"http://dcc-service-develop.masastack.com\"},\"web\":{\"name\":\"DCC.Web\",\"id\":\"dcc-web\",\"domain\":\"\"}},{\"id\":\"tsc\",\"name\":\"TSC\",\"service\":{\"name\":\"TSC.Service\",\"id\":\"tsc-service\",\"domain\":\"http://tsc-service-develop.masastack.com\"},\"web\":{\"name\":\"TSC.Web\",\"id\":\"tsc-web\",\"domain\":\"\"}},{\"id\":\"alert\",\"name\":\"Alert\",\"service\":{\"name\":\"Alert.Service\",\"id\":\"alert-service\",\"domain\":\"http://alert-service-develop.masastack.com\"},\"web\":{\"name\":\"Alert.Web\",\"id\":\"alert-web\",\"domain\":\"\"}},{\"id\":\"scheduler\",\"name\":\"Scheduler\",\"service\":{\"name\":\"Scheduler.Service\",\"id\":\"scheduler-service\",\"domain\":\"http://scheduler-service-develop.masastack.com\"},\"worker\":{\"name\":\"Scheduler.Worker\",\"id\":\"scheduler-worker\",\"domain\":\"\"},\"web\":{\"name\":\"Scheduler.Web\",\"id\":\"scheduler-web\",\"domain\":\"\"}},{\"id\":\"mc\",\"name\":\"MC\",\"service\":{\"name\":\"MC.Service\",\"id\":\"mc-service\",\"domain\":\"http://mc-service-develop.masastack.com\"},\"web\":{\"name\":\"MC.Web\",\"id\":\"mc-web\",\"domain\":\"\"}},{\"id\":\"auth\",\"name\":\"Auth\",\"service\":{\"name\":\"Auth.Service\",\"id\":\"auth-service\",\"domain\":\"http://auth-service-develop.masastack.com\"},\"web\":{\"name\":\"Auth.Web\",\"id\":\"auth-web\",\"domain\":\"\"},\"sso\":{\"name\":\"Auth.SSO\",\"id\":\"auth-sso\",\"domain\":\"\"}}]",
"ELASTIC": "{\"Nodes\": [\"http://10.10.90.189:30200\"],\"Index\": \"auth_user_development\"}",
"MASA_ENVIRONMENT": "Development",
Expand Down

0 comments on commit caf6f64

Please sign in to comment.