How to create a field and an action on field in Plone 5? - plone

I have installed a Plone with the following information:
Plone vr 5.0.7 (5017)
CMF 2.2.10
Zope 2.13.26
Python 2.7.13 (default, Jul 26 2017, 16:31:12) [GCC 4.3.0] PIL 1.1.7
Was wondering how can I relate a field (when you add a field on content type) to an action!
So the idea is to create a field that admin can choose which user group can receive an email/notification when the content is published. I know I can add a rule content for emailing but I would have a choice to choose which user group can receive it. Could be an add-on or something in Plone?
Thank you!

Add a "User's group" condition in the content rule declaration.

To actually add a field and relate it to an action, you'd need to program dedicated content-types.
Yet, as you want to grant the privilege "get mail on publication" to certain groups, it would be consistent to solve this as a permission-assignments, meaning to grant the groups a local-role on the item.
In concrete that would boil down to these steps:
Create a new role, e.g. "Receiver".
Install "collective.contentrules.mailtorole".
Create a global content-rule which checks on publication of any item who holds the local-role "Receiver" on the item, and sends the mail to them.
The admin can then assign the groups to the new role "Receiver" via the sharing-tab of an item.

Related

Symfony 3 - How to change configuration values at runtime

What is the best practice way to handle changes to configuration parameters (kept in yml) that have to happen at runtime?
I am working on a site where the owner wants to change various settings in his admin back end.
For example, enabling/disabling the confirmation email and link sent by FOS User bundle when a new user registers for an account.
Thanks for your time
For those operations you need the use Compiler Pass.
https://symfony.com/doc/current/service_container/compiler_passes.html
Here sample Custom Compiler pass;
https://symfony.com/doc/current/components/dependency_injection/compilation.html#creating-separate-compiler-passes
Here is a good example for compiler passes; ( Usually using with service tags )
https://symfony.com/doc/current/service_container/tags.html

ARM template Parameters

Currently, all parameters passed to a template are hardcoded (for instance, Windows Vm Version: 2012-Datacenter, 2016 Datacenter and so on). is their a way to dynamically update these values based on the type of subscription or the location?
As I known, there is no in-build feature for you to dynamically update parameter values based on the type of subscription or the location. You could add your feedback here. In order to achieve this purpose, I assume that you need to add your code logic to generate the TemplateParameterFile based on the type of subscription or the location of your resource group, then leverage New-AzureRmResourceGroupDeployment command to deploy your Azure resources. Moreover, here are some common ARM templates, you could refer to them.

Can't import LDAP query feed data

I've set up an LDAP query that successfully pulls all data from the field physicaldeliveryofficename from our Windows Active Directory:
I also setup a View that uses the query to further refine the list, so I am confident that the query itself is working:
The problem occurs when I try to use Feeds Importers to grab that data and add it to my Offices content type. Here are my settings:
Basic settings
Name: Offices
Attach to content type: Use standalone form
Periodic import: 1 day
Import on submission: checked
Fecher
LDAP Query Fetcher is selected
LDAP Query Fetcher
LDAP Query: HPSI Offices (that's the right query)
Parser
LDAP Entry Parser for Feeds is selected
Processor
Node processor is selected
Node processor
Bundle: Office
Language: Language neutral
Insert new nodes: Insert new nodes
Update existing nodes: Update existing nodes
Text format: plain text (also tried HTML)
Action to take when previously imported nodes are missing in the feed: Delete non-existent nodes
Author: Currently using user 1, but also tried anonymous
Authorize: checked
Expire nodes: never
Mapping
Source: [physicaldeliveryofficename]
Target: Title (title)
Used as unique
When I run this feed importer, the only thing that happens is a single Office is created with a blank title (see last image.) Can anyone tell me why this importer isn't working when both the LDAP query and a View that depends on it are working?
UPDATE: I opened an issue against LDAP Feeds at Drupal.org and it appears I'm not the only one with this problem. https://www.drupal.org/node/2685009
Sounds a great deal like the issue reported on the LDAP module's issue queue. Try applying the patch from comment 11.

CRM 2013 Online Sandbox Instance Field Permissions Error

There is an issue with my Sandbox after it was refreshed from Production. All solutions are successfully copied over. However, fields that had Field Level Security do not show up under Field Permissions even though they have Field Level Security Enabled.
I can add and remove Field Level Security on fields that previously did not have it but am unable to do so with fields that previously had Field Level Security. The error I get, even as a System Administrator (same as in our Production environment), states that I do not have permission to modify those fields.
Next, I was able to add the Field Permissions in Test for the entity fields I wasn't able to previously by adding a Field Security Profile in Production containing the fields. I had hoped that I'd also be able to bring over which users were members after importing the Solution. Unfortunately, they weren’t and when I tried to add them again in Test, I got
Unhandled Exception: System.ServiceModel.FaultException`1 [[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Caller [MY GUID] doesn't have privilege for attribute [ATTRIBUTE WITH THE FIELD LEVEL SECURITY] of entity [ENTITY WITH THE ATTRIBUTE]Detail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
<ErrorCode>-2147220906</ErrorCode>
<ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Caller [MY GUID] doesn't have privilege for attribute [ATTRIBUTE WITH THE FIELD LEVEL SECURITY] of entity [ENTITY WITH THE ATTRIBUTE]</Message>
<Timestamp>2014-07-30T16:55:44.9611645Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>
The added Fields are still not visible under System Administrator. Even removing the fields and then trying to add myself as a member still gives me this error. Looking at the XML, even though I removed field level security from the fields (confirmed they did not show in the Field Permissions list), they are not actually removed. I compared it with the XML I saw previously which had no field level security on any fields (this was before I tried making any changes)
Is this a bug? Is there a possible step that was missed?
I've seen others with similar issues, but they were for 2011 and the suggested answers of publishing twice didn't help.
tldr; Field Level Security issues when refreshing Sandbox from Production. Cannot disable and re-enable Field Level Security on fields that had Field Level Security enabled in Production.
This issue was resolved after CRM Support fixed this. It was an unintended bug on their end.
This issue doesn't exist for CRM 2015

Permission error when trying to add or edit addresses (e.g. Customer Address)

I am trying to do some development to the LogisticsPostalAddress form that is used on forms where an address is modified/added. When trying to add an address (e.g. to an existing Customer) I get the error.
You are not authorized to access table ‘Shipping carrier’ (ShipCarrierAddress). Contact your system administrator.
I have scoured the user permissions and cannot find a way to give permission to this table. I would think that adding an address is a basic function, so can not figure out why I can't.
Thanks,
Kevin
What role is your user assign to? Are you sure users in that role should be able to add addresses to the customer? If yes, here is how you can add permissions to the ShipCarrierAddress table:
With admin user, open development envionrment (Ctrl + Shift + W from
running Ax, or run "ax32.exe -development" from command prompt)
In the AOT, go to Security > Roles. Find the role your user is assigned to.
Exapand the Role > Permissions > Table, add new table and set table name to ShipCarrierAddress and EffectiveAccess (in your case
you want to insert, thus set to Create)
Save the role, and compile the role (not sure if compile is mandatory)
Start a new Ax instance with the user with limited permissions and verify you have access.
I turned out it was an issue with the installation of the lab.

Resources