Comments (11)
@pguerr061703 -- those LDAP settings look generally correct to me. Here's what I use at Lehigh University, with the hostname of the LDAP server just redacted:
$config['use_ldap'] = 1; // Default: off
$config['ldap_server'] = "ldap.server.name.lehigh.edu";
$config['ldap_port'] = 389;
$config['ldap_basedn'] = "dc=lehigh,dc=edu";
$config['ldap_uname_field'] = "uid";
I recommend just doing some testing with an LDAP utility to make sure doing LDAP searches finds users with the username field and base DN settings you're using. To get to the values I have above, I used a phpldapadmin instance that we have here -- I experimented with the search filter to determine that it was the uid attribute in our LDAP configuration that contained the part of our e-mail address that matches usernames here. Do you have access to someone at Fordham who knows details about your LDAP configuration, and could help you get setup with a utility like phpldapadmin to do test searches?
from scalar.
If you'all use an LDAP server, there's room for that already built into Scalar; see the LDAP fields in the config file: https://github.com/anvc/scalar/blob/master/system/application/config/local_settings.php
Other than that, you could add some lines of code to the login model at https://github.com/anvc/scalar/blob/master/system/application/models/login_model.php that does a simple string search for "fordham.edu" ... I don't see why this wouldn't work like you need.
Let us know how it goes!
Craig
from scalar.
Excellent suggestions. I will test them out. Thank you.
-Patrick
from scalar.
Will this work ? I want to confirm before implementing? Should the use_ldap variable be set to true?
$config['use_ldap'] = true; // LDAP authentication is off by default
$config['ldap_server'] = "university-LDAP-server.edu";
$config['ldap_port'] = university-port;
$config['ldap_basedn'] = "ou=people,o=university.edu,o=cp";
$config['ldap_uname_field'] = "university-LDAP-account";
from scalar.
LDAP isn't my specialty but that looks right. I say go for it :)
from scalar.
LDAP entries. It didn't work. Not sure why. Can you provide me a line I could use to add to login_model.php to only allow emails with "fordham.edu" to register to scalar. This may be an easier alternative.
I am not PHP admin, so I am unsure how to do this.
thank you
from scalar.
Real quick, if @ccc2lu is watching this thread, he added the LDAP settings, so he might be able to help out with that. @ccc2lu any thoughts?
from scalar.
It didn't work. I am not sure I want to configure LDAP.
Can someone please assist with adding lines to login_model.php to only allow emails with "fordham.edu" to register to scalar
from scalar.
@pguerr061703 Why don't you give this a try: if you open up the user model,
https://github.com/anvc/scalar/blob/master/system/application/models/user_model.php
Then search for the "register" function, I think you could simply place this at the top of the function (ie, before the line that says "// ReCAPTCHA version 1"):
if (!stristr($array['email'], 'fordham.edu')) throw new Exception('Only email addresses under the fordham.edu domain may register on this Scalar install');
This will cause the register page to return that error message if the email address isn't a fordham one....
Let me know how it goes?
from scalar.
You are awesome!!! Thank you kindly! Much appreciated.
from scalar.
You bet @pguerr061703!
from scalar.
Related Issues (20)
- PHP 8.1 throws errors in development mode HOT 3
- Lens as Advanced Search HOT 1
- Google Maps are no longer loading HOT 1
- Deprecated package yepnope v1.5.3 HOT 1
- CE dates in in timeline don't plot correctly HOT 2
- Changin url on new book throws error
- Resizing window duplicates inline notes HOT 2
- error display/logging? HOT 3
- Feature request: Creative Commons licence select/display HOT 1
- Instance crashes after 5 relationship links HOT 5
- A PHP Error was encountered HOT 3
- Error message returns "object Object" to user in alert HOT 1
- Error message returns JSON parse error in alert to user HOT 1
- Feature Request: Place uploads in separate directory by default
- Error when importing book to custom install HOT 1
- Bulk update page metadata HOT 2
- Feature Suggestion: Anonymous Interactive Lens HOT 1
- Feature Suggestion: List lens should include the queried metadata column HOT 4
- Lenses description not saved HOT 1
- Content search queries with apostrophe/single quote return no results HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scalar.