- Optional password complexity rules. You may set
passwordMinLength
to a number of your choice. You may also setpasswordRules
to an array of rule names. Those available by default arenoSlashes
,noSpaces
,mixedCase
,digits
, andnoTripleRepeats
. To block existing passwords that don’t meet this standard, you should also setpasswordRulesAtLoginTime: true
. Additional password rules may be registered by callingapos.login.addPasswordRule('name', { test: fn, message: 'error message' })
. The function will receive the password and must returntrue
if it is acceptable. Thanks to Michelin for making this work possible via Apostrophe Enterprise Support. -
apos.utils.attachmentUrl
has been added to lean mode. It works exactly likeapos.attachments.url
, which is not available in lean mode, with one exception: to avoid adding more overhead to lean mode, the default size is the original. So you must take care to specify thesize
option for performance when working with images. - When an in-page edit is made and an area is updated as a result, the
update
method of the appropriate module is now called, rather thanapos.docs.update
. This allows forbeforeSave
, etc. to fire in this situation. Thanks to Kalia Martin of swiss4ward for this contribution. - Apostrophe now provides a
res.rawRedirect
method, which performs a redirect without adding the sitewide prefix. On sites without a prefix it is equivalent tores.redirect
. This is useful when working with a URL that is already prefixed, such as the_url
property of a page or piece. - Using the
groups
option toapostrophe-users
together with a very large database can lead to slow startup because the groups are found by title, and title is not an indexed field. You may now specify theslug
for each group in the array, in which case they are found byslug
instead, which is an optimized query. However most very large sites would be better off removing thegroups
option and allowing groups to be managed flexibly via the admin bar. -
apos.tasks.getReq
now provides more simulated i18n support. - The occasional but irritating “not blessed” bug when editing content on the page has been fixed via a new “reinforced blessing” mechanism.
1 Like