search filter based on gidNumber in Openldap - openldap

I am new to openLDAP.
When I create a new user (using posixAccount), there is a field called GID Number. As this attribute is single valued. How can I add user to multiple groups or use search filter to get list of user in multiple groups based on GID number. Some one please suggest me on this.
Thanks in advance

The attribute gidNumber in posixAccount entries is just the primary group of the user (like in /etc/passwd).
You have to add posixGroup entries each with a separate unique gidNumber. Depending on the schema you want to use (RFC 2307 vs. RFC 2307bis) you populate attribute memberUid or member with a reference to the member entry. memberUid contains only the uid of the member and member would contain the DN of the member's entry.

Related

How can i generate custom IDs for objects in firebase?

Please I want to give custom IDs to my database objects in Firebase but I don't now how to do it. Firebase creates default IDs for database objects which I don't want. I want to be able to assign my own IDs to objects or the child nodes of in the database for unique identification.
Most likely you're adding the items to the database with something like:
ref.push().set("my value");
This generates a new unique key under ref and sets your value on it.
If you want to use you own key/name for the child location, add the item with:
ref.child("my key").set("my value");
You cannot customize ID of firebase object, but you can create another field with ID role.
ref.child("my_id").set("customize_id");
after that, using "Filter by key" to get exactly your object you want.
In our case: We need to have a user_id type Int and auto-increase, so we can't use default _id of firebase object, we create user_id ourself to solve this problem.

In Dynamics Ax, In this case Type of field : EDT, Enum, String or an integer?

You need to store the preferred method of correspondence in a table
named Dir Person Table.
The solution must meet the following requirements:
The table must have a field that stores the preferred method of correspondence. The field must have values of Mail, E-mail, or
Unknown. The text representing the preferred method of correspondence
values on forms must be localized to the language used by the user.
The values in the database must not be localized.
How should you create the field in Dir Person Table ?
A. Create an extended data type (EDT) used to store the preferred method of correspondence. The EDT must extend from the string. Use the EDT to create the field in Dir Person Table.
B. Create an enum that stores the preferred method of correspondence and has the values of Mail, E-mail, and Unknown. Use this enum to create the field in Dir Person Table.
C. Create a string field that stores the preferred method of correspondence.
D. Create an integer field that stores the preferred method of correspondence.
I did choose B, the enum but others say that it's an EDT that extends
a string ?? response A...
Any explanation .
thanks.
You were correct, it is B.
The table must have a field that stores the preferred method of correspondence. The field must have values of Mail, E-mail, or
Unknown
This clearly means it can contain 3 options/enumerations.
The text representing the preferred method of correspondence values on forms must be localized to the language used by the user.
This means it must use a label that can be localized to the relevant language.
The values in the database must not be localized.
This means the value in the database must not be "mail", "email", or "unknown" because those would be localized, but instead must be 0, 1, 2, which is an enum.
Whoever says the answer is A is wrong.

When to go for hashmap and arraylist?

Please explain above question with example scenario I am confusing which is best.
If you to fetch a specific object based on keyword or any identity in list then you have to iterate the list get object and compare with its values
In map you can directly create key value pair..you can pass key and get the value.
ex:
A object user is present which has several properties one of them is user code
Now if you have list of user object then you will fetch one by one user object and compare the code of each user...but in map you can directly store user object with user code as key pass the key and get the desired object
map.get("key");
but if you requirement is not based on key type access better to use list.. example as you to just display list of items or you have to perform sublisting.
Too broad question, but will try to shorten it:
When you have to get the value based on key (key can be anything) then you go for hashmap. Consider a telephone directory where you go to appropriate name and search for person's name to find his number.
While if you have similar object's and want to store them somehow and later on retrieve it say by index or traverse them one by one then you go for list. So if your task is to find employees older than age 50 yrs, you can just return a list of employees who are older than 50.

Remove Name and owner in CRM Dynamics

I have created a form for cheque entries. But when i create the form "name" and "owner" field are compulsory and it does not allow to remove either. Any suggestions really appreciated.
Owner attribute is inside the form because the Ownership when you created the entity was set to User or Team instead of Organization.
If you create the entity to be as Organization, you will not have the Owner field BUT you are limited to define the roles on this entity, you can't define for example to make users from a business unit to access only to their records, if a user has a read privilege will be at Organization level (meaning he will be able to read all the records)
Regarding the Name field it's the primary attribute of the entity, from your screenshot looks like you have a field called ChequeNumber, you can delete that field and rename the label of Name field to Cheque Number (if the field type is Single Type of Text) or when you create the entity you define correctly the primary attribute:

Permission based on one column - secure?

I am developing an early version of my site and before I create the production version, I'd like people's opinions on whether I'm going about things the right way. The main objective is to allow users to share playlists. I have the User table (ASP.NET Membership), Playlist table and a permission table. I'd like a user to create a playlist and grant/deny access to it for a given user. My approach to this is to have the permission table contain a "pStatus" column where 0/null = deny, 1 = read.
When a user requests permission to access a playlist, the creator chooses the pStatus enumeration. The column is then changed accordingly for the recipient. When accessing the recipient's profile page, a scan of the column is done to check all playlists the recipient has access to and the relevant playlists are displayed.
Is this an efficient and secure way of doing things? Or is relying on one column not enough?
(nb - playlists can be considered to be similar to Facebook groups)
Thanks for any advice
I would use some sort of bitmask in the n-m relation table I'm guessing is in between User and PlayList (i.e. a table named UserPlaylist, because 1 user can have access to more than 1 playlist and vice versa 1 playlist can be accessed by more than 1 user).
If you define the needed permission levels up front (i.e. 0 = no access, 1 = read, 2 = write, etc.), you can just add a column to the UserPlayList table, that represents the access level.
So the UserPlaylist table will have 2 foreign key columns of which the combination should be unique (i.e. define the primary key to be the 2 foreign key columns) and a column that holds the level of access in the form of a bit / integer.
So Permission has foreign keys to User and Playlist. Is there any reason for the third column specifying permission level? It sounds like it should be: If a row exists in Permission, the user is allowed to access the playlist.
Otherwise, that sounds good to me.

Resources