What is the best way to lay out nested data in SQL Server Reporting Services 2005? - sql-server-2005

I am attempting to create a report that contains a list nested within another list to produce the following layout:
User name: Bob
User info: Interesting stuff about Bob
Permissions: Administrator
SuperUser
User
User name: Next user
etc...
The data looks like this:
UserName Details PermissionName
Bob Interes... Administrator
Bob Interes... SuperUser
Bob Interes... User
NextUser More stuff User
In my example I am trying to display the user details using a list and then to display the permissions using a second list embedded within the first list. I decided to do this because there are a variable number of permissions that can be assigned to a user. However this approach doesn't seem to work.
Is there a better way or am I just missing something really obvious?

how about using a sub report for the 2nd set?

You can also use a table control and group your data on "UserName" with the detail grouped on "Permission".

Related

LDAP Query to check if User is a member of a particular security group

I am trying to adapt the following query to find out if a user is a member of a specific group (security group) but I do not get it to work and I fail to understand it completely.
(&(objectClass=user)(sAMAccountName=yourUserName)
(memberof=CN=YourGroup,OU=Users,DC=YourDomain,DC=com))
in my case, the user is XYZ and the security group is called [SecITGroup].
The user is however located under OU=USERS OU=GO OU=AzureSync.
I have tried the following:
(&(objectClass=user)(sAMAccountName=XYZ)
(memberof=CN=SecITGroup,OU=AzureSync,OU=GO,OU=USR,DC=de,DC=domain,DC=int))
yes, I set the domain name to the actual domain and No result is shown is displayed.
What is the return attribute am I supposed to get back?
I found a solution or a workaround to this.
The LDAP Query is rather to say show me users in the specific group:
(&(objectCategory=user)(memberOf=CN=Administrators,OU=Admin,OU=Groups,DC=domain,DC=com))
The attribute is sAMAccountname which displays the user's name.

JIRA Api for 'Find users with browse permission ' not working

I am trying to get a list of users who have access to a particular issue.
I tried using GET /rest/api/2/user/viewissue/search for this . But it asks for username and issueKey query parameters. Also it is returning only one user.
How does this api work?
I refered to the documentation here: https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-user-viewissue-search-get
EDIT to the below: If you query with username=% (i.e. a wildcard) then it returns
every user with permission
As the documentation you've linked to states, you do need to provide an issueKey and a username or it won't return any results:
username
string
the username filter, no users returned if left blank
This is saying, find all the users who have permission to see the specified issue, where their username matches this specific filter value I'm providing, i.e. not all users that have permission.
It's filtering on some combination of username, display name and email (I think).
I have a JIRA Cloud site with three users:
admin, which has a display name of Mike Jones and an email of mike.jones#...
mike, which has a display name of Mike Jones and an email of mike.jones#...
mike.jones, which has a display name of Mike Smith and an email of mike.jones#...
If I run this query, I see all three users returned:
https://<url>/rest/api/2/user/viewissue/search?issueKey=DD-1&username=mike
If I change the last query parameter to be username=smith then I see just the third user with a display name of Mike Smith, which suggests it's querying the Display Name field:
https://<url>/rest/api/2/user/viewissue/search?issueKey=DD-1&username=smith
But if I use the parameter username=jones, then I see all three users, which suggests it's querying the Email field:
https://<url>/rest/api/2/user/viewissue/search?issueKey=DD-1&username=jones
And if I use the parameter username=admin, then I only see the admin user, which suggests it's querying on the Username field:
https://<url>/rest/api/2/user/viewissue/search?issueKey=DD-1&username=admin

Can users have their own product edit permissions in OpenCart?

I am completely new to OpenCart. I have created two users - user1 and user2 and both have the product add/edit permission. user1 add a product. But both user1 and user2 can edit the same product. What I am looking for is only user1 and superadmin can edit the product.
Likely if user2 adds another product then only superadmin and user2 can edit that product. Is it possible in OpenCart? If the situation is not possible in OpenCart, can anyone suggest an alternative to do the same?
Unfortunately, there is no such a thing in OC!
You have two options to accomplish that:
Find a plugin here that makes that (if any)
Code it manually
Step 1: you must keep track of the user who created the product, so you will need to add a new column to the <DB_PREFIX>_product table and save the id of the user who created the product in it, this is a simple step you will just need to modify the model function that saves the product details
Step 2: modify the get product model function and make it returns the id of the creator along with other data
Step 3: modify the edit product page controller index function in such a way that if the logged in user id does not equal the creator of the product, then display some error message

checking if a user belongs to a group in ldap

I'm new to LDAP and have a question.I want to check if particular user belongs to a particular group or not. i figured out how to query the ldap server.So it is right now able to check if the user exists on the server or not. but i couldn't figure out how to check the user with the right group (line below is what i have used)
l_retval := DBMS_LDAP.search_s(l_session,l_ldap_base, DBMS_LDAP.scope_subtree, 'objectclass=*', l_attrs, 0, l_message);
My main purpose is to authorize users of a particular group (not authenticate)
I have two bases-one for authorization (uid=anders,ou=ourusers,o=company) and one for the groups (cn=programmers,ou=groups,o=company)
Could anyone please guide me so as how to proceed!
Use this filter, and make the search DN to be the DN of the group you want to check with.
(&(objectClass=*)(member=[userDN]))
The [userDN] is the full DN of the user to search for like cn=bob,ou=bar,o=foo. It won't work if it is not a full DN. If you just have a username, first get a DN of the user, and then use this filter.
Use memberOf or isMemberOf to determine if an entry is a member of a group. See also this question.
I'm new in the active directory too, but I have the feeling that skipping one generation, and directly use System.DirectoryServices.AccountManagement is the way to go.
One article I'be been reading is:
http://msdn.microsoft.com/en-us/magazine/cc135979.aspx
I'll try to get back to your question later
There also seems to be a bug in the verion 4 of the .Net framework: it will bug if there is a group in the group you are looking at. Maybe a correction in version 4.5.

Getting user profile data in Silverlight 4

I am fairly new to Silverlight and RIA services, and I am trying to build a small project to understand it. So basically I created a Business Application, and I have the normal Login screen where I can add a user. That is fine and I can add a user and get him into the aspnet_Users table. Now I have created some extra fields, like Mob No, Tel No, DOB, Locality etc, which I have put in a table I have created called the UserProfile, and my idea is to get the username that was registered, and insert it into my UserProfile table with the other relevant data.
So I created a page called Profile.xaml, I created a UserProfileDomainService.cs where I have just one query, to get the user profile data from the table, and then created a Details DataGrid on my page, and the QueryName in my case is GetUserProfilesQuery(). Now what i wish to do is, get the user logged in, get his username, and check in my table to see if there is already data in the table. If there is populate the fields on the DataGrid with data, so that the user can modify this data, and if not, allow the user to insert data into the table.
So I have created a UserProfileViewModel class, and I want to create the query to get the data relevant to this user. However I got stuck on how to do all this, and how to get the user logged in.
Can anybody give me some advice or point me to some tutorials on how I can achieve this?
Thanks a lot and your help is very much appreciated.
In your domain service query you can use ServiceContext.User.Identity.Name to get the information specific to that user to include in your db query. I do something similar in our project.
We use entity framework so the LINQ to Entities query looks like:
return this.ObjectContext.UserSnapins
.Include("Snapin.EvolutionModule")
.Where(si => si.User.UserName == ServiceContext.User.Identity.Name)
.OrderBy(si => si.PageOrder);