Base solution for your next web application
Open Closed

Missed Timezone Setting #2719


User avatar
0
fguo created

I am trying 'ASP.NET Core & Angular 2+' v3.3.0, and found my Host settings page looks a little different with described on Development Guide. I have an "Appearance" tab, but missing "General" tab, so I can't find the "Timezone" setting. There is a similar topic on forum #10969 (Jan 10, 2017). It states "İt will be fixed in the next release". Is it still missed? :?:

I want to give users an ability to change timezone and language on their own page individually. Is it possible? :?:

As default, the user cannot change the language on his page. If he select another language, an error massage pops up: "Required permissions are not granted. At least one of these permissions must be granted: Users". As my test, the administrator must grant permissions by checking off "Users/Changing permissions". I just wonder/concern what else affected :?: , because the words "Changing permissions" may cover more changing beside language.

Thanks,


8 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    For the first problem, you need to set Clock.Provider to UtcClockProvider in your *.Host application. If you do that, timezone setting will be displayed.

    I didn't understand the second problem very well. It seems like logged in user does not have right to see User pages, am I right ? Changing language is not bound to a permission.

    Thanks.

  • User Avatar
    0
    fguo created

    I attached screen shots here to describe the second problem - User cannot change language. (It seems that I can only attach 3 files or less, so I have to delete the attachment on the following 1. and 2)

    1. On admin page, I can select a language (e.g. German).See the attachment "Select Language".
    2. After the selection, the admin page will refresh and show German text. See the attachment "German".
    3. On User page, I tried to select a language (e.g. German). See the attachment "User Screen".
    4. After the selection, the user page pops up an error. See the attachment "Required Permission".
    5. The User role has no permissions granted by default. See attachment "Edit User Role".
    6. If I check off the "Users" on the "Edit User Role" page (above 5), the user can change language as admin does, but the user will have the right to see User page, which is not my expected.

    So, how do I let all users change language on their own page no matter what permissions granted? :?:

    Thanks,

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Thank you for detailed explanation. We will check this and fix if there is a problem.

    Thanks again, I will get back to you as soon as possible.

  • User Avatar
    0
    fguo created

    I am also a little confused on the first problem. How do I set Clock.Provider to UtcClockProvider in *.Host application? Do you mean to add a code: Clock.Provider = ClockProviders.Utc; in Startup.cs, Configure(), after app.UseAbp(); :?:

    Thanks,

  • User Avatar
    0
    ismcagdas created
    Support Team

    Yes, exactly. You need to put that line in Startup.cs file, because ABP set's it to UnspecifiedClockProvider by default.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Thank you for finding this bug, I have resolved it. You can check the solution here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/101">https://github.com/aspnetzero/aspnet-ze ... issues/101</a>.

    You will be able to see it after we invite you on github.

    Thanks.

  • User Avatar
    0
    fguo created

    Thank you! :D Shall I wait until the v3.4 release? Or, just modify the code files like you did?

    I tried to move the ChangeLanguage(ChangeUserLanguageDto input) method from *.Application\Users\UserAppService.cs to *.Application\Users\Profile\ProfileAppService.cs, but got building errors.

    It is not a big deal if you release v3.4 soon. I just wonder how to MERGE the v3.4 into my current v3.3, because I have modified some code somewhere.

    Thanks,

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Probably 3.4 will not be released very soon. In anways you can apply changes in this commit to your project. <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/commit/b303d2a17b2fa48c7f4b8a1c98b42800563a9f93">https://github.com/aspnetzero/aspnet-ze ... 00563a9f93</a>

    Please let us know if build error continues.