Alfresco filter people by creator name - select

I want to modify the webscript alfresco-remote-api-5.0.d.jar\alfresco\templates\webscripts\org\alfresco\repository\person\people.get.js. I need to display for the connected user only user he has created.
I have modify the filter to include username in query.
filter = filter + " AND cm:creator:admin";
people.getPeoplePaging(filter, paging, sortBy, sortAsc);
This must display only users created by admin.
But it's not working(no user is returned).
How can i select only users created by a certain user ?

By looking at below definition of content model I sure , what you want to achieve is not possible ,as person(user) does not have creator property.Below link shows the content model for users.
https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/COMMUNITYTAGS/V4.2c/root/projects/repository/config/alfresco/model/contentModel.xml
https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/COMMUNITYTAGS/V4.2c/root/projects/repository/config/alfresco/model/systemModel.xml

Related

Odata results displaying user id values under certain columns instead of usernames when data imported into excel from devops?

I imported certain Workitems data from my Devops project into excel using Odata queries.
In that data under certain columns for eg: AssignedToUserSK its showing the user id values like this 06ea0e70-432d-4315-8ffd-87706966a7b6
Instead of this i need the username to be displayed instead of user id.
How to solve this?
If you want to see usernames in the Odate query instead of user id, you need add the columns AssignedTo.UserName, CreatedBy.UserName and ChangedBy.UserName. Then you can see the user name.
Result:

How to Display Attribute Group Name in Product Tab Magento 2.1.3

I created an attribute set and attribute groups with attributes in it. In the admin panel the attributes are listed in groups, like i created them. But on the front productpage all the attributes are listed together, without displaying the attribute group name first.
I would like to display the Attribute Group Name on the product page (more information tab), before the attributes in this group. How do i do that?
There is no way to do this by default in Magento 2.
There are a few ways I can think of to acheive this. Perhaps best would be to extend the getAdditionalData() method in /Block/Product/View/Attributes.php so that it adds the attribute group name (or id) to the returned array.
You would then need to create a local copy of Magento_Catalog/templates/product/view/attributes.phtml and iterate the array returned by the modified getAdditionalData() method sorting it according to the group name and then output the data with group name headings.
I'd be interested to hear of other or best practice approaches to this type of relatively simple extended functionality in Magento 2.

Sharepoint - Load a form's view based on user

I am using a data connection list to load desired views in an InfoPath form on SharePoint. I have a permission list with 2 columns: usernames and control group. My form on the main list loads a specific view based on what the username and group are of the permission list. You have to filter out the group based on the form's username() function to match the username column and set that as a condition to (on form load) change it to a specific view.
All this works, but the problem comes in when you have a user with multiple control groups. The filter only returns the first instance it finds. I can't think of a way to fix this. Maybe load the other list as a repeating table into the form, but then how would I reference that table in the conditions of a form load rule? Or is there a way to get a field filter to look past the first item it finds?
Update: I forgot to mention that I have to use a field to hold your filtered username:id:group aka group[title=username()] and then use that in the form load conditions. I think this is where the problem is, as this filter is what doesn't store all instances of the users id from the control list, but only the first.
SharePoint 2010 with forms created in InfoPath 2010
Are you querying the data in from info path or using visual studio, if you are querying in info path check the condition as Display name matches the username() and the query the data

Using all input controls for use in one report

I have a report that uses a query of input controls. It is a drop-down menu of specific ID's (ie. 28, 13, 30...) I want to know if it is possible to have my report go through each of these parameters and populate the report one page at a time for each of them.
Here is an example of the different parameters I want the report to loop through:
Do you want to create a page for all Partner IDs? Or just for the Partner IDs that a user selects? Either is possible.
Using all Partner IDs is probably easier. Modify your report query which probably has something like WHERE partner_id = $P{partnerID}. Remove the where clause. Add grouping and sorting to the query to group on partner id. Each group can start on a new page. And now you don't need a parameter at all.
If you want the user to select the Partner IDs, then you need to use a multi-select input control rather than the single-select input control you're using now. Update your query to use something like this: WHERE $X{IN, partner_id, partnerID}. Add grouping and sorting as above.

Password Protect a form in MS Access 2003

I am trying to create a login for my database and I don't want to use the Microsoft way of doing so. I want to have the users login with a username and password then have that information verified in the "tblUsers" table.
UserID LoginID Level LevelID
jpurk jack23 admin 3
krimes kitty editor 2
lwalms low34 reader 1
I got as far as verifying the "UserID" and "LoginID" using dlookup
Nz(DLookup("[LoginID]", "tblUsers", "[UserID] = '" & Me.txtUserID & "'"), "")
=Me.txtPassword
The problem I have now is that I want certain items on the menu unavailable to users without the proper Level; If they are only an "editor" or a "reader", then I don't want them to have access to the "administrative" button where I have placed all admin forms.
After I use dLookup to verify the username and password, how do I now find out their "Level" and assign rights to different menu items? Thank you.
Assuming your DLookup has found an existing LoginID value, you can use another to retrieve that user's LevelID. Then enable/disable the administrative command button based on their LevelID.
I'll suggest something like this in Form Load:
Dim lngLevelID As Long
lngLevelID = DLookup("[LevelID]", "tblUsers", "[LoginID] = " & Me.txtLoginID)
Me.cmdAdmin.Enabled = (lngLevelID = 3)
Notes: That assumes you've previously loaded the user's LoginID number into a text box named txtLoginID. txtLoginID could be hidden if you don't want the users to see it. Or you can grab the LoginID value by some other method.
If you have one-to-one matches between Level and LevelID, you shouldn't need to store both values in tblUsers. You can create a UserLevels lookup table to hold both, and store just the LevelID in tblUsers as a foreign key to the appropriate row in UserLevels.
Finally, the strategy you're using can work, but the security is shaky. As "guidance" to users willing to follow the rules, it's OK. But it can be easily circumvented by even unsophisticated users. Look for a different approach if your security needs are stringent.