Giter Club home page Giter Club logo

profiles's Introduction

CSH Profiles

Python 3.6

The Computer Science House @ RIT's web interface to our LDAP server containing all of our members' data. Users are able to view other users information that they have access to, modify their own data, and search through all users. You can find users by going directly to their profile:

<img src="https://profiles.csh.rit.edu/user/uid">

or via group pages:

<img src="https://profiles.csh.rit.edu/group/gid">

or the site's built in search feature.

CSH Avatar

Users can get the profile pictures of people by going to this url:

<img src="https://profiles.csh.rit.edu/image/uid">

This will get the user's picture from LDAP or if they do not have one, will redirect you (HTTP 302) to gravatar using their CSH email. This will return a default profile picture if there is no LDAP image or gravatar image associated with the user's CSH account. If the user has their GitHub and/or Twitter attributes set but has no LDAP image, their profile image from there will be proxied and served.

Authorization

Authentication happens via pyOIDC with CSH SSO, authenticating as the user who is viewing the page. This makes it show that they can only view / modify attributes that they have access to.

The server uses heavy caching via lru_cache to speed up the results as much as possible.

Setup

Profiles has the following dependencies:

requests
csh_ldap==2.0.2
flask
flask_sqlalchemy
flask_migrate
flask-pyoidc
flask-optimize
PyMySQL
pyGravatar
Flask_Uploads
pylint
pillow

You can install them by running pip install -r requirements.txt in the program directory.

Create a copy of config.env.py named config.py and make the following modifications:

SERVER_NAME = os.environ.get('PROFILES_SERVER_NAME', 'profiles.csh.rit.edu')

to

SERVER_NAME = os.environ.get('PROFILES_SERVER_NAME', 'localhost:8080')

Reach out to an RTP to get OIDC credentials that will allow you to develop locally behind OIDC auth.

LDAP_BIND_DN is your CSH DN. It is in the following format:

uid={CSH User Name},cn=users,cn=accounts,dc=csh,dc=rit,dc=edu

LDAP_BIND_PASS is your CSH password.

If you did everything right, you should be able to run python app.py and develop locally.

Code Standards

Use Pylint to ensure your code follows standards. Commits will be pylinted by Travis CI, if your build fails you must fix whatever it tells you is wrong before it will be merged.

profiles's People

Contributors

evelyndooley avatar jdrit avatar mbillow avatar devinmatte avatar adamhb123 avatar mfrancis95 avatar mxmeinhold avatar ronandef avatar sgreene570 avatar evanclough avatar dependabot[bot] avatar sman591 avatar woo2 avatar liam-middlebrook avatar galenguyer avatar sauriol avatar csssuf avatar jayhors avatar gambogi avatar fickleefrit avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.