Check if user has permission to access module in joomla 2.5 - joomla2.5

I using joomla 2.5. I have made a custom module. I need to run some codes in component if that user had permission to access the module.
Is there a function to check that if the user has permission access to the module.

Related

You don't have permission to access this page by Template Library and Redux Framework plugin

after assigning a second user as an editor to the website the login is giving an error:
"You don't have permission to access this page."
when I deactivate Template Library and Redux Framework plugin the user can log in but when I activate again it gives this error

Django - how to set user permissions after login via LDAP?

I'm starting a project in Django and I've already managed to get ldap authentication working, with django-auth-ldap.
Now, I want that after the user logs in, django checks if this user exists in certain tables of my models, and if it does, give these users permission to access certain apps.
For example, I have an app called 'alimentacao'. Only users registered in my model 'alimentacao.alunos' will be able to access "http://meu-projeto/alimentacao"
As the user is created automatically if it doesn't already exist in the user model, I believe I would have to create a custom ldap authentication backend and check, after successful login, if the user exists in the table, and then set the permission to user.
Neither the Django nor the django-auth-ldap documentation clearly explains how to create an authentication backend: in which folders the files need to be created, or how the application will call my custom method, or if I need to change any settings. I'm completely lost.

Google Admin SDK - "Not Authorized to access this resource/api" when updating delegated Admins

I am using the .NET API to provision user accounts. I am having a problem when trying to update a user who has delegated admin privileges as a member of one of the builtin admin roles such as the "Password Reset Role". If I remove them from the role the account is updated successfully. When a member, I cannot update orgUnitPath, givenName, or familyName. I am able to update the custom attributes that have been added.
Anyone know if this a bug or feature? I am using version 1.36.1.1335 of the Google.Apis.Admin.Directory.directory_v1.dll library.

Any way to get "Employee Details" from Google API?

Is anyone aware of any Google API with the user scope (NOT the Admin API in the Directory SDK) that allows you to retrieve the custom employee attributes?
The G+ API seems to skip these
https://developers.google.com/+/web/api/rest/latest/people#resource
Our issue is that we don't want to grant access to the developer console, but rather do this PER-USER. I.E. a user logs into our app and we display to her the custom attributes for her G Suite account, but we do this as her (not as an approved API scope via the dev console).
Leaving this answer for anyone like me who finds this question.
The Directory API allows a user to query the custom attributes for their account even without any admin permissions at all.
https://developers.google.com/admin-sdk/directory/v1/reference/users/get
You need to ensure that projection is set to full and viewType is set to domain_public.
You may need to check the permissions for reading the custom attributes to ensure that a user is allowed to see theirs. We do this in the Google Cloud Directory Sync.

ACL for Joomla Component

I have downloaded a 3rd party plugin for Joomla (Breezing Forms). I have created a new user for my Joomla instance who only has access to certain privileges. Breezing Forms is the only component they can use.
I have set these settings correctly from the super user, there is one action, "Configure" which I have set to "allow" for my specific user type.
Now when I log in as that user, I cannot see the components menu (I have disallowed all other components).
But if I navigate to the component:
http://domain.co.uk/administrator/index.php?option=com_breezingforms
Then I can access the page.
I have tried denying access, then trying to access the page and it rightfully prevents me from using it, so the ACL privileges are working, but there is an issue with it displaying in the menu.
I am using Joomla 2.5
Thanks,
Ian
Usually a component has two permissions which deal with that kind of stuff.
core.manage (Access Administration Interface) allows access to the component in the backend. This means the menu item is present in the Components menu.
core.admin (Configure) allows to set the options for this component.
So make sure you have set the correct permissions in BreezingForms. You probably want to have core.manage (Access Administration Interface) and not the other one. Also if you set the Configure one, make sure you also enable the manage one. It doesn't make much sense otherwise.