Coder Social home page Coder Social logo

fridaycore's Introduction

FRIDAY CORE

FridayCore is a set of Sitecore extensions that every Sitecore site needs.

FridayCore XA is also available in feature/xa branch and it is only designed for Sitecore Experience Accelerator-powered (aka SXA) Sitecore sites.

Install all non-XA features using this command:

Install-Package FridayCore

Most features are disabled by default, so check config files for instructions.

Feature 1. Sign up rules

Let users create Sitecore accounts when they have email address which belongs to whilelisted domain.

For example, whiteliest @mydigitalagency.com to allow your colleagues create accounts with admin rights, and @sitecore.com to give Sitecore Support staff read-only permissions to speed up support services.

Note, for security reason the user account is created with random password which needs to be reset to the email address. So mail server must be configured.

Install this feature using this command:

Install-Package FridayCore.SignUpRules

Feature 2. Account reset rules

Reset specific user accounts on every Sitecore restart (for example, well-known sitecore\admin):

  • Reset password and write it to the log file
  • Unlock the account if it is locked out

Note, it is common practice of writing admin password to the log file. It is typically very safe because users that have access to the file system of the web server can do whatever thay want anyway.

Install this feature using this command:

Install-Package FridayCore.AccountResetRules

Feature 3. Auto packages

Enable automatic soft installation of Sitecore packages placed in configured folder on every Sitecore restart. Soft mode means skipping all item sub-trees that already exist, which means it will only do installation only when it is really necessary.

For example, imagine a Sitecore package that includes Home/Articles item and 3 dummy news subitems. On first restart, Sitecore will add Articles item with 3 subitems and the content authors will delete dummy items, replacing them with real ones. On next restart, Sitecore won't change eixsting Articles item and won't restore dummy news subitems.

Install this feature using this command:

Install-Package FridayCore.AutoPackages

Feature 4. Sitecore started event

This feature is enabled by default because all it does is writes to the log file straight after the Sitecore has served first HTTP request, and also raises an even so custom logic can fire at the same moment.

Install this feature using this command:

Install-Package FridayCore.SitecoreStarted

Feature 5. Config Extensions

Enable $(connectionstring:key/property) syntax in configuration files to embed connection string or its part into any place in configuration file.

For example, ConnectionStrings.config file

<connectionStrings>
...
  <add name="smtp" connectionString="Data Source=localhost,25; User ID=smtpusername; Password=smtppassword" />
...
</connectionStrings>

and /App_Config/Environment/MailServer.config file

<configuration>
<sitecore>
  <settings>
    <setting name="MailServer" value="$(connectionstring:smtp/DataSource)" />
    <setting name="MailServerUserName" value="$(connectionstring:smtp/username)" />
    <setting name="MailServerPassword" value="$(connectionstring:smtp/Password)" />
    <setting name="MailServerPort" value="$(connectionstring:smtp/port)" />
  </settings>
</configuration>
</sitecore>

Install this feature using this command:

Install-Package FridayCore.ConfigExtensions

yay! it's friday

fridaycore's People

Contributors

alenpelin avatar lukearentz-lc avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

gravypower

fridaycore's Issues

[Content Editor] Package item context menu option

In Content Editor, add "Package this item" menu option when right-clicking an item in the content tree. When selected, the dialog is poped-up which asks whether to include descendants or not. When confirmed, the package is created and downloaded to the browser.

[SXA] Static error page generation on CD

OOB SXA 1.7 generates static error page on CM instance when special Ribbon button is pressed. We need to fix it to be fully automatic - so the page is generated on all instances on item:save(:remote) event.

Respect media extension in URL

When having several same-name media items with different extensions, the request extension must be taken into account when picking one of them prior to apply sort order.

Scenario:

  1. Upload two different images with image.png and image.jpg names to Sitecore
  2. Request /-/media/image.png and /-/media/image.jpg

Actual Result:
Both images are the same

Expected Result:
The images are different and corresponding

Reset to specified password in AccountResetRules

It should be possible to hard-code password in configuration file to reset account password to. The use case is for local development with specific conventions regarding user accounts and passwords.

Sync items

Create an extension that lets developer link several items and choose item name and/or specific fields to be synchronized across linked item chain. It is like item cloning but simpler and can be used in development only.

Create NuGet packages

Create a bunch of NuGet packages:

  • FridayCore
    • FridayCore.Configs (App_Config only)
    • FridayCore.Binaries (assemblies only)
  • FridayCore.Source
    • FridayCore.Source.Configs
    • FridayCore.Source.Code

Configuration engine to access connection strings

Extend configuration engine to use and :

<configuration>
<sitecore>
  <settings>
    <setting name="MailServer" value="$(connectionstring:smtp/DataSource)" />
    <setting name="MailServerUserName" value="$(connectionstring:smtp/UserName)" />
    <setting name="MailServerPassword" value="$(connectionstring:smtp/Password)" />
    <setting name="MailServerPort" value="$(connectionstring:smtp/Port)" />
  </settings>
</sitecore>
</configuration>

where ConnectionStrings.config file is following:

<?xml version="1.0" encoding="utf-8"?>
<connectionStrings>
...
  <add name="smtp" connectionString="Data Source=localhost,25; User ID=smtpusername; Password=smtppassword" />
...
</connectionStrings>

Cascade update insert options of inherited templates

Feature: InsertOptionsCascade

Consider 3 templates:

  • T1
  • T2 inherits T1
  • T3 inherits T2 (and T1)

In Standard Values of each of them update Insert Options so you can insert items of same type and all derived ones:

  • T1 insert options for T1
  • T2 insert options for T1 and T2
  • T3 insert options for T1, T2 and T3

Update insert options of T1 so that insert options also include Folder template.

Actual Result:
This does not affect T2 and T3 - they still don't have Folder template in insert options.

Expected Result:
All T1, T2 and T3 have Folder template in insert options

When creating an account don't email the password

I think it would be better practice (and probably more secure) to send a link with userid and expiration date via jwt and force the user to choose their own password

https://jwt.io/

This would mean

  • admin passwords are floating around in emails
  • the user only had a limited time to action the email

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.