ACL User group deny in CQ5 - aem

For a page in CQ5 ,have added permission as deny for jcr:write ,for particular user AA .The user AA is restricted to write on the page. But when i added a user group(user AA is a member of the group) with deny action for jcr:write its not working, user AA is able to write .

Related

TYPO3 tt_products: send a tracking email on status change to admin as well as user

I use tt_products 2.7.18 on TYPO3 6.2.25.
I configured orderEmail_to to the admins email address.
When an order is placed the customer and the admin gets a respective email - as expected.
But when I change the tracking status, only the customer gets an email.
The manual does not tell me how to configure and I'm starting to question the possibility altogether.
Can anyone tell me if and how to configure?
Thanks in advance.
plugin.tt_products {
...
orderEmail_to = admin#emaildomain.com
...
}
It is correct to set the orderEmail_to. You should check in the TypoScript Object Browser (backend module Template) that this setup is applied on your tracking page id, where in this example I have given "admin#emaildomain.com" as the admin's email address.
Only the tracking status numbers between 50 and 59 will send a notification email to the customer.
tt_products 2.7.27 is already available. Maybe your version 2.7.18 is already outdated.

ZF2 - Get ServiceManager from layout

In my Application layout i have one segment which represent ADMIN PANEL. I render that segment by the partial('admin_panel.phtml'); ?> view helper.
Now, I want to render 'admin_panel.phtml' if a user have 'admin' role and not if it doesn't. My idea was to check users role and based on that render admin panel or not.
I have service registered with ServiceManager as invokable, which return current users role, but how to get ServiceManager from layout?! How to call my service to check users role?

CQ5 currentPage.listChildren() does not list all the pages

I have a page say xyz which contains many sub pages. Some of the subpages are "CUG enabled". In my jsp I am calling currentPage.listChildren() but this is listing the CUG enabled pages only if I login as an admin. If anonymous user hits the url for this jsp then the CUG enabled pages are not listed. Below is my jsp code:
Iterator<Page> itr = currentPage.listChildren();
while(itr.hasNext()) {
Page ctxPage = itr.next();
String url = hostName + ctxPage.getVanityUrl()+".html";
%>
<a href="<%=url%>"><%=url%><br/>
<%
}
}
I also tried logging-in to the workspace as an admin using the method described here, but it didn't work.
Any help is appreciated, Thanks!
I think this behaviour is intented - only users belonging to the user group specified as the CUG can view these pages.
Now it depends for what purpose you need to list those pages.
The easiest solution would be to add the "everyone" to the Admitted Groups in the CUG-Section of those specific page properties. But that's defeating the purpose of having CUG in the first place.
CAUTION: Doing so would allow "everyone" to access those pages - which might not be what you want.
ADDITION:
If you want to preserve access rights you need to go down to node level and access the repository directly.
Here it is shown how you can get a "Resource Resolver with admin rights":
https://cqwemblog.wordpress.com/2013/12/29/ways-to-access-jcr-repository-in-cq5/
You could then use this resource resolver to fetch your page and access it's children.

TYPO3 frontend user login redirect to URL

A customers' TYPO3 website has gone online and is now accessible via 4 separate URLs. The sites' structure looks like this:
Entry point
|
|-- Example 1 (www.example1.at, group1)
|-- Example 2 (www.example2.at, group2)
|-- Example 3 (www.example3.at, group3)
|-- Example 4 (www.example4.at, group4)
Each of these websites offers a frontend login for registered users, who are assigned to a dedicated group.
If a user of group1 logs in via www.example1.at, everything works fine - he gets redirected to the user area of group1, let's say www.example1.at/user_area.
But if a user of group2 tries to log in via www.example1.at, he should be redirected to www.example2.at/user_area.
Currently, this does not work. TYPO3s' user group settings only allow a redirect to a page. But since the user area of group2 is only accessible via a dedicated URL, I get the following error:
ID was outside the domain
Of course this happens because the PID called cannot be accessed via the current URL of www.example1.at.
My question: is there a way (e.g. via the TSconfig in the user group settings) to redirect to a external URL instead of an internal page on login?

Different registration forms for different roles. FOSUserBundle

I'm absolutely new of Symfony, and I'm trying to implement a registration form that works only with invitation
but that can redirect two different forms for two different roles.
In practice if I send an invitation for an USER_TYPE1 role the client can only register like USER_TYPE1, if I send an invitation for an USER_TYPE2 the client can only register like USER_TYPE2 (and, of course, assigns the corrispondent role).
Is it possible?
thank you in advance for your help
UPDATE:
I want two different form because one user will be allowed to update file, but will also have to set his position and other important settings. The second user will only allow to download the files uploaded by the first kind of user, and his profile needs completely different information.
I do not have enough reputation to ask for details, but one thing that is not clear in your question is: why do you need 2 different forms? In your question, you mention 2 different roles, but why do you need 2 different forms? If you really need 2 different forms, then you should first:
- create a new form type
- create a new view (twig)
Like Boris suggested, I would keep some kind of token for every invitation sent, and associate an email address, and a role to it. Then modify your registration route so you can pass a token in there, like this:
register:
pattern: /signup/{token}
defaults: { _controller: MyBundle:Registration:signup }
In the registration action of your controller, you created the correct form type and display the appropriate twig, depending on the ROLE associated to the token you just got. And when handling a POST, you check the Token again to see if it matches the email address, and assign the proper ROLE when creating the User.
public function signupAction($token) {
// 1. Get the Token entity matching the $token variable
// 2. Create the correct form type
// 3. Display the correct twig for GET, assign correct ROLE to new User for POST
}
But you can't use FOSUserBundle as-is. You will have to overwrite the registration process. You can read the FOSUserBundle documentation about that.
What's certain is that, for every invitation you send, you should keep a token with a matching email address and ROLE (the role you want to give to that person).