MODX - Getresources created by logged in user - modx

MODX Revolution 2.2.5-pl
getresources
Newspublisher
Wondering whether it is possible to show the resources that belong to the current logged in user.
The idea is to have a option in the users profile, to list of all resources created by him.
thanks

You need a filter of resources by createdby field, for example:
[[!getResources?
&parents=`[[*id]]`
&where=`{"createdby:=":[[!+modx.user.id]]}`
&tpl=`myRowTpl`
]]

Related

Web Application permissions usage for html objects like Buttons etc

What i am confused of is how to appropriately apply permissions(enable or disable) access to a JSF / HTML field of a form for some "logged in my application" user. Lets say i have a page with 2 textboxes and a button. I want only a certain user to change one of the textboxes. The permissions would be read from a database.
Is there a link to some internet content about certain techniques. I tried googling but they all stay in explaining authenticating and permissions per calls not objects on the html page. A link, book or an explanation guidance would be appreciated.
I suggest a EL evaluation as Fritz comments: disabled = "#{not currentUser.havePermission (component.id)}". Where currentUser is a SessionContext bean for fetch user information as name, permission list, password...
Then boolean havePermission(component.id) can find if current object ID is allowed by permission list.
For managing a lot of objects, you can use "massAttribute" (Omnifaces library).
http://showcase.omnifaces.org/taghandlers/massAttribute

Configure PeoplePicker to hide users with specifc custom attribute

SharePoint On Prem. 2013. Currently the people picker is configured to see users in DomainA, DomainB and DomainC.
That was OK, but now users in DomainA have been added to DomainC as part of an integration activity. The people picker now shows duplicates for users in A and C. I do not want to hide all users in Domain C. I only want to hide those users in Domain C who are already in A.
I added a custom attribute to a test user in Domain C and mapped it to "someattribute" in the user profile service. I populated the custom attribute for my test user with the text "sometext"
I then configured people picker using LDAP query thus:
stsadm -o setproperty -pn peoplepicker-searchadcustomfilter -pv "(&(objectCategory=user)(!someattribute=sometext))" -url http://mywebapp
Unfortunately instead of hiding the user in Domain C with the custom attribute set, this always shows the user in Domain C and hides the duplicate user in Domain A instead.
Any help from the experts here appreciated. If there is a better way than doing it like this, let me know.
Zero responses? OK for anyone else looking for an answer to this, I could not get the custom attribute approach to work. I think this is because the attribute only exists in Domain C, not the others and this led to unpredictable results.
I didn't want to start creating new attributes in the other two domains, so instead I had a group created in Domain C and added some users to it that have accounts in both Domains A and C.
I then configured the people picker to filter on the group like this:
(&(objectCategory=user)(!memberOf=CN=groupmigrated,OU=X,OU=Groups,DC=DomainC,DC=com))
The breakthrough for me was using dsquery to get the CN/OU path of the new group.
Hope this helps someone.

How to know which users are logged in on TYPO3

Does anyone know if there is a way to do this, or an extension that displays who is logged in at the Front End and at the Back End.
Something that displays a list of the logged-in users (both fe_users and be_users).
Thanks.
In TYPO3 you can also check who is online in real-time :
Connect as Admin
Click on User Admin in ADMIN TOOLS part
Change Compare User Settings by List Users Online
You will see Who Is Online.
Check the demo site to try : http://demo.typo3.org
every user has his own session. Table be_session. Look at it. you got every info you need

Restrict users to view a particular page in sharepoint

i have a sharepoint site http://spp/sitepages/page2.aspx
I have a group called "Group1" with full control. There are two users "User1" and "User2".So both the users will have full control and both of them can make any changes in page2.aspx. Now this is my requirement, i want to allow only "User1" to access, when "User2" access my page i want to show "Access Denied" is it possible without code.
Since we can't vote to close towards sharepoint.se yet, here it goes:
You need to go to the SitePages library in the browser, select the page you want to change permissions and then go to the dropdown menu for the item > Manage Permissions > Edit Permissions (Stop Inheriting), remove all users / groups and only add User1 to the item.
A more detailed guide is available at the Microsoft Office website online
If you can put your page into a document library - do so. This way you can adjust your permissions properly with no code.

How to programmatically check view permission to a url in SharePoint?

I am displaying a list of popular public bookmarks to the logged-in user. Some users dont have access to these bookmark-urls and I want to suppress the results so that only accessible urls are shown to the user.
I tried to use the DoesUserHavePermissions method, but the problem is that I am not sure what object does the url points to (item/list/web/site).
I figured it out :|
when getting popular bookmarks from SocialTagManager i need to pass the logged-in users context i.e. SPServiceContext.Current and SharePoint will take care of the rest.

Resources