User Notifications Improvements, introduce AddUsers extension method - This week in Orchard (06/01/2023)

Gábor Domonkos's avatar
Admin UI, Announcement, This week in Orchard, Role, Archive Later Feature, Notifications Feature - This week in Orchard (23/09/2022)

Happy New Year everyone! Let's start this year with the improvements of the User Notifications feature, new Orchard Core sites, and of course, the latest fixes and improvements for Orchard Core. Check out our post for the details!

Orchard Core updates

Move role creation into the recipe instead of feature activation

Features should not decide which roles are created but only the recipes. Features can decide what are the default permissions for a named role if the role exists.

So, here is a summary of the enhancements this brings:

  • We can now use recipe steps to explicitly list the roles we want to use for the site. We are no longer forced to use the default roles.
  • If a role is deleted, it won't come back at some point after installing new features. Currently, even if we delete a role, it could come back after installing more features.
  • If the Roles feature is disabled and re-enabled later, we keep track of permissions history to automatically assign any permission that would not have been assigned previously while the Roles feature is disabled.
  • If an enabled feature introduces new permissions, it'll now get assigned to the proper roles by default "if these roles exist".

Move role creation into recipes

Introduce the AddUsers extension method

This change is about refactoring the logic that adds the specified user-related services to the collection. This is handy if we use OrchardCore.Users outside Orchard Core, something similar to AddPortableObjectLocalization, which registers the required services.

Introduce AddUsers extension method

Demos

User Notifications Improvements

The goal of the User Notifications module is to push notifications to the user, meaning notify the user somehow. There are many ways you can notify a user, one of them being a web notification, you can do SMS, you can do push to a mobile application, etc. We wrote about this new feature a few weeks ago in this post.

If you head to Configuration -> Features and enable the Email Notifications and Notifications features, you will have a way to notify users and send email notifications to them.

You can send notifications using workflows, but you can send them from code of course. The following workflow notifies the owner of the blog post when a blog post is published or deleted. It also notifies the user if the account of the given user is enabled, for example.

Notifications workflow

You can see a bell icon near the Dark mode icon at the top right. If you click on that icon, you will see a list that shows you all of the notifications you have right now. You can click on them to mark them as read, or you can click on All Notifications at the bottom, which will redirect you to the page where you can see all of your notifications.

Notification Center

And that's not everything! If you would like to know more, don't forget to check out this recording on YouTube! And if you want to try out this feature for yourself, now you can find the Notifications feature in the preview build of Orchard Core!

News from the community

New websites using Orchard Core: the site of the game called Transformers: Reactivate and the careers site of Splash Damage

Transformers: Reactivate is a 1-4 player online action game developed by Splash Damage, coming to PC & consoles.

Splash Damage worked on some of the biggest franchises in the world, with the likes of Batman, Halo, Gears of War, and now Transformers getting the Splash Damage treatment. Check out their careers site here!

Transformers Reactivate Orchard Core site

If you are interested in more websites using Orchard and Orchard Core, don't forget to visit Show Orchard. Show Orchard is a website for showing representative Orchard CMS (and now Orchard Core) websites all around the internet. It was started by Ryan Drew Burnett, but since he doesn't work with Orchard anymore, as announced earlier, it is now maintained by our team at Lombiq Technologies.

Orchard Harvest 2023

For those too young to remember, we had Orchard conferences, called Orchard Harvest. And the conference website was available under orchardharvest.org, but unfortunately, it's not anymore. The last one was in 2017 in New York. So, having another get-together is very much overdue. If you would like to see or get a feeling of how this looked like before, we have a couple of mood videos on the Orchard YouTube channel, like this one from the first conference.

The point is that we should really think about organizing the next one, and we at Lombiq can take part in that or provide an organizing role with anybody who wants to take part. If you have any feedback or are looking forward to having a Harvest again, please share your opinion by filling out this survey about the upcoming Orchard Harvest!

Orchard Dojo Newsletter

Lombiq's Orchard Dojo Newsletter has 394 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course.

Do you know of other Orchard enthusiasts who would like to read our weekly articles? Tell them to subscribe here!

If you are interested in more news about Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!

No Comments

Add a Comment