Display only authorized media to user

We are developing an iOS application and have looked in the demo iOS app provided by Kaltura.
After reading through the API documentation and demo app code, I am still struggling with a media access issue.

How can I control which media the user sees?
Right now I get back a list of all media including the ones which the user does not have access to.

This is how I am initializing the Kaltura Session:

self.client.ks = [sessionService startWithSecret:@“SECRET_KEY” withUserId:nil withType:KalturaSessionType.ADMIN withPartnerId:PARTNER_ID withExpiry:315569000 withPrivileges:@"*,disableentitlement" ];

Youre starting an Admin session, to only display the videos from a specific publisher on a user level, use the User secret and start a USER session. Controlling what media a user can view inside a certain publisher is then controlled using the entitlement api, so entitlements need to be enabled.

@themmai thanks for the response.

I tried using the User secret and USER session. But then the list of videos changes completely and I can no longer see some of the public videos as well.
What should be the withPrivileges value when using USER session?
Or does it depend on how our installation of Kaltura is configured?
Would you know from where can I find out the details of how entitlements are being used in our installation of Kaltura.

Once again, thanks!

Youre starting an Admin session, to only display the videos from a specific publisher on a user level, use the User secret and start a USER session. Controlling what media a user can view inside a certain publisher is then controlled using the entitlement api, so entitlements need to be enabled.

@themmai thanks for the response.

I tried using the User secret and USER session. But then the list of videos changes completely and I can no longer see some of the public videos as well.
What should be the withPrivileges value when using USER session?
Or does it depend on how our installation of Kaltura is configured?
Would you know from where can I find out the details of how entitlements are being used in our installation of Kaltura.

Once again, thanks!