diff --git a/tt_github_oauth_app/__init__.py b/tt_github_oauth_app/__init__.py new file mode 100755 index 0000000..91c5580 --- /dev/null +++ b/tt_github_oauth_app/__init__.py @@ -0,0 +1,2 @@ +from . import controllers +from . import models diff --git a/tt_github_oauth_app/__manifest__.py b/tt_github_oauth_app/__manifest__.py new file mode 100755 index 0000000..c50d2c4 --- /dev/null +++ b/tt_github_oauth_app/__manifest__.py @@ -0,0 +1,34 @@ +{ + 'name': "Login via Github", + 'summary': """ + Login via Github logs user into odoo using their github credentials. + """, + 'description': """ + Github + Odoo github + Github login + Odoo Github integration + Github Odoo integration + Odoo+Github + Github Odoo login + Odoo Github authentication + Github login on Odoo + """, + + 'author': "Tortecs India", + 'website': "", + 'category': 'Sales', + 'version': '15.0.1.0.0', + 'application': True, + 'license': 'LGPL-3', + 'currency': 'EUR', + 'price': 0.0, + 'maintainer': 'Tortecs India', + 'support': 'tortecs.in@gmail.com', + 'images': ['static/description/banner.gif'], + 'depends': ['auth_oauth'], + 'data': [ + 'data/tt_github_auth.xml', + 'views/tt_github_oauth_providers_views.xml', + ] +} diff --git a/tt_github_oauth_app/controllers/__init__.py b/tt_github_oauth_app/controllers/__init__.py new file mode 100755 index 0000000..f924671 --- /dev/null +++ b/tt_github_oauth_app/controllers/__init__.py @@ -0,0 +1 @@ +from . import tt_github_controller diff --git a/tt_github_oauth_app/controllers/tt_github_controller.py b/tt_github_oauth_app/controllers/tt_github_controller.py new file mode 100755 index 0000000..31fee3a --- /dev/null +++ b/tt_github_oauth_app/controllers/tt_github_controller.py @@ -0,0 +1,195 @@ +import json +import logging + +import requests +import werkzeug +from odoo import http, api, SUPERUSER_ID, _ +from odoo import registry as registry_get +from odoo.addons.auth_oauth.controllers.main import OAuthLogin, OAuthController, fragment_to_query_string +from odoo.addons.auth_signup.controllers.main import AuthSignupHome as Home +from odoo.addons.web.controllers.main import set_cookie_and_redirect, login_and_redirect, ensure_db +from odoo.exceptions import AccessDenied +from odoo.http import request +from werkzeug.exceptions import BadRequest + +_logger = logging.getLogger(__name__) + + +class TTAuthLoginHome(Home): + @http.route() + def web_login(self, *args, **kw): + ensure_db() + if request.httprequest.method == 'GET' and request.session.uid and request.params.get('redirect'): + return request.redirect(request.params.get('redirect')) + tt_providers = self.list_providers() + + response = super(OAuthLogin, self).web_login(*args, **kw) + if response.is_qweb: + error = request.params.get('oauth_error') + if error == '1': + error = _("You are not allowed to signup on this database.") + elif error == '2': + error = _("Access Denied") + elif error == '3': + error = _("Email Already Exist.\nPlease contact your Administrator.") + elif error == '4': + error = _("Validation End Point either Not present or invalid.\nPlease contact your Administrator") + elif error == '5': + error = _("Github Oauth Api Failed, For more information please contact Administrator") + elif error == '6': + error = _("Github Oauth Api Failed,\nClient ID or Client Secret Not present or has been compromised\n" + "For more information please contact Administrator") + else: + error = None + response.qcontext['providers'] = tt_providers + if error: + response.qcontext['error'] = error + + return response + + +class TTGitHubOAuthController(OAuthController): + + @http.route('/tt/auth_oauth/signin', type='http', auth='none') + @fragment_to_query_string + def tt_signin(self, **kw): + tt_state = json.loads(kw['state']) + tt_user_data = json.loads((kw['user_data'])) + tt_dbname = tt_state['d'] + if not http.db_filter([tt_dbname]): + return BadRequest() + tt_provider = tt_state['p'] + tt_context = tt_state.get('c', {}) + tt_registry = registry_get(tt_dbname) + with tt_registry.cursor() as cr: + try: + env = api.Environment(cr, SUPERUSER_ID, tt_context) + validation = { + 'user_id': tt_user_data.get('github_id'), + 'email': tt_user_data.get('email') or tt_user_data.get('username'), + 'name': tt_user_data.get('github_name') or tt_user_data.get("username"), + } + tt_login = env['res.users'].sudo()._auth_oauth_signin(tt_provider, validation, kw) + tt_user = env['res.users'].sudo().search([('login', '=', tt_login)]) + tt_user.write({'git_username': tt_user_data.get('username'), + 'git_email': tt_user_data.get("email")}) + tt_credentials = (request.env.cr.dbname, tt_login, kw.get('access_token')) + cr.commit() + tt_action = tt_state.get('a') + tt_menu = tt_state.get('m') + redirect = werkzeug.urls.url_unquote_plus(tt_state['r']) if tt_state.get('r') else False + url = '/web' + # Since /web is hardcoded, verify user has right to land on it + if redirect: + url = redirect + elif tt_action: + url = '/web#action=%s' % tt_action + elif tt_menu: + url = '/web#menu_id=%s' % tt_menu + resp = login_and_redirect(*tt_credentials, redirect_url=url) + return resp + except AttributeError: + # auth_signup is not installed + _logger.error("auth_signup not installed on database %s: oauth sign up cancelled." % (tt_dbname,)) + url = "/web/login?oauth_error=1" + except AccessDenied: + # oauth credentials not valid, user could be on a temporary session + _logger.info('OAuth2: access denied, redirect to main page in case a valid session exists,\n' + 'without setting cookies') + url = "/web/login?oauth_error=3" + redirect = werkzeug.utils.redirect(url, 303) + redirect.autocorrect_location_header = False + return redirect + except Exception as e: + # signup error + _logger.exception("OAuth2: %s" % str(e)) + url = "/web/login?oauth_error=2" + return set_cookie_and_redirect(url) + + +class TTOAuthLogin(OAuthLogin): + + def list_providers(self): + try: + tt_providers = request.env['auth.oauth.provider'].sudo().search_read([('enabled', '=', True)]) + except Exception: + tt_providers = [] + for tt_provider in tt_providers: + tt_state = self.get_state(tt_provider) + if tt_provider.get('name') in ['GitHub', 'github']: + params = dict( + client_id=tt_provider['client_id'], + scope=tt_provider['scope'], + state=json.dumps(tt_state), + ) + tt_provider['auth_link'] = "%s?%s" % (tt_provider['auth_endpoint'], werkzeug.urls.url_encode(params)) + else: + return_url = request.httprequest.url_root + 'auth_oauth/signin' + params = dict( + response_type='token', + client_id=tt_provider['client_id'], + redirect_uri=return_url, + scope=tt_provider['scope'], + state=json.dumps(tt_state), + ) + tt_provider['auth_link'] = "%s?%s" % (tt_provider['auth_endpoint'], werkzeug.urls.url_encode(params)) + return tt_providers + + +class TTCallbackHandler(http.Controller): + + @http.route(['/oauth/callback'], auth='public', csrf=False, methods=['GET', 'POST'], type='http') + def get_oauth_token(self, **post): + if post.get('state'): + provider = request.env['auth.oauth.provider'].sudo().browse(json.loads(post.get('state')).get('p')) + else: + provider = request.env.ref('tt_github_oauth_app.tt_provider_github') + provider = request.env[provider._name].sudo().browse(provider.id) + tt_redirect_url = request.httprequest.url_root + "tt/auth_oauth/signin" + if post.get("code"): + client_id = provider.client_id + client_secret = provider.tt_client_secret + if not client_id or not client_secret: + r_url = "/web/login?oauth_error=6" + _logger.info( + 'OAuth2: Either of Client ID or Client Secret not present, access denied, redirect to main page in case a valid session exists, without setting cookies') + redirect = werkzeug.utils.redirect(r_url, 303) + redirect.autocorrect_location_header = False + return redirect + data = { + "client_id": client_id, + "client_secret": client_secret, + "code": post.get("code") + } + url = provider.validation_endpoint # "https://github.com/login/oauth/access_token" + if "oauth" not in url: + r_url = "/web/login?oauth_error=4" + _logger.info( + 'OAuth2: Validation Endpoint not presesnt, access denied, redirect to main page in case a valid session exists, without setting cookies') + redirect = werkzeug.utils.redirect(r_url, 303) + redirect.autocorrect_location_header = False + return redirect + response = requests.post(url, json=data) + if response.status_code in [200, 201] and response.reason == 'OK': + response_data = response.content.decode("UTF-8").split('&') + if 'error=' in response_data or 'error=' in response_data[0]: + r_url = "/web/login?oauth_error=5" + _logger.info( + 'OAuth2: access denied, redirect to main page in case a valid session exists, without setting cookies. REASON :- %s' % str( + response_data[0])) + redirect = werkzeug.utils.redirect(r_url, 303) + redirect.autocorrect_location_header = False + return redirect + auth_token = response_data[0].split('=')[1] + tt_user_data = requests.get('https://api.github.com/user', auth=('', auth_token)).json() + # Todo: update the image of user in odoo + params = { + 'username': tt_user_data.get('login'), + 'github_id': tt_user_data.get('id'), + 'github_name': tt_user_data.get('name'), + 'email': tt_user_data.get('email'), + } + tt_post_url = 'access_token=%s&state=%s&user_data=%s&provider=%s' % ( + auth_token, post.get('state'), json.dumps(params), provider.id) + tt_redirect_url = "%s?%s" % (tt_redirect_url, tt_post_url) + return werkzeug.utils.redirect(tt_redirect_url) diff --git a/tt_github_oauth_app/data/tt_github_auth.xml b/tt_github_oauth_app/data/tt_github_auth.xml new file mode 100755 index 0000000..912ca20 --- /dev/null +++ b/tt_github_oauth_app/data/tt_github_auth.xml @@ -0,0 +1,14 @@ + + + + + GitHub + https://github.com/login/oauth/authorize + repo,user + True + https://github.com/login/oauth/access_token + fa fa-fw fa-github + Log in with GitHub + + + \ No newline at end of file diff --git a/tt_github_oauth_app/models/__init__.py b/tt_github_oauth_app/models/__init__.py new file mode 100755 index 0000000..6e8cbe8 --- /dev/null +++ b/tt_github_oauth_app/models/__init__.py @@ -0,0 +1,2 @@ +from . import tt_github_oauth_providers +from . import tt_users_git_authorisation diff --git a/tt_github_oauth_app/models/tt_github_oauth_providers.py b/tt_github_oauth_app/models/tt_github_oauth_providers.py new file mode 100755 index 0000000..9dfcf96 --- /dev/null +++ b/tt_github_oauth_app/models/tt_github_oauth_providers.py @@ -0,0 +1,24 @@ +import logging + +from odoo import models, fields + +_logger = logging.getLogger(__name__) + + +class TTAuthProviderInherit(models.Model): + _inherit = "auth.oauth.provider" + + tt_client_secret = fields.Char(string="Client Secret") + tt_is_github = fields.Boolean(compute='_compute_is_secret_required') + tt_user_type = fields.Selection([('internal', 'Internal User'), + ('portal', 'Portal User')], default="portal", string='User Type') + + def _compute_is_secret_required(self): + for rec in self: + if rec.auth_endpoint: + if 'github' in rec.auth_endpoint: + rec.tt_is_github = True + else: + rec.tt_is_github = False + else: + rec.tt_is_github = False diff --git a/tt_github_oauth_app/models/tt_users_git_authorisation.py b/tt_github_oauth_app/models/tt_users_git_authorisation.py new file mode 100755 index 0000000..92215b0 --- /dev/null +++ b/tt_github_oauth_app/models/tt_users_git_authorisation.py @@ -0,0 +1,64 @@ +import logging + +import requests +import werkzeug +from odoo import models, fields, api, _ +from odoo.addons.auth_signup.models.res_partner import SignupError +from odoo.tools.misc import ustr + +_logger = logging.getLogger(__name__) + + +class TTResUsersInherit(models.Model): + _inherit = 'res.users' + + oauth_token = fields.Char(string="Oauth Token", readonly=True) + git_username = fields.Char(string="Git Username", default="No username") + git_email = fields.Char(string="Github Email") + + def tt_github_api_hit(self): + tt_provider = self.env.ref('tt_github_oauth_app.tt_provider_github') + tt_provider = self.env[tt_provider._name].sudo().browse(tt_provider.id) + if tt_provider: + if not tt_provider.client_id: + r_url = "/web/login?oauth_error=6" + _logger.info( + 'OAuth2: Either of Client ID or Client Secret not present, access denied, redirect to main page in case a valid session exists, without setting cookies') + redirect = werkzeug.utils.redirect(r_url, 303) + redirect.autocorrect_location_header = False + return redirect + url = "https://github.com/login/oauth/authorize?client_id=%s&scope=repo,user" % tt_provider.client_id + response = requests.get(url) + if response.status_code in [200, 201]: + return response.url + + @api.model + def _signup_create_user(self, values): + """ signup a new user using the template user """ + + # check that uninvited users may sign up + provider = self.env.ref('tt_github_oauth_app.tt_provider_github') + if provider.id == values.get('oauth_provider_id') and provider.tt_user_type == 'internal': + if 'partner_id' not in values: + if self._get_signup_invitation_scope() != 'b2c': + raise SignupError(_('Signup is not allowed for uninvited users')) + return self._tt_create_user_from_default_template(values) + else: + return super(TTResUsersInherit, self)._signup_create_user(values) + + def _tt_create_user_from_default_template(self, values): + template_user = self.env.ref('base.default_user') + if not template_user.exists(): + raise ValueError(_('Signup: invalid template user')) + if not values.get('login'): + raise ValueError(_('Signup: no login given for new user')) + if not values.get('partner_id') and not values.get('name'): + raise ValueError(_('Signup: no name or partner given for new user')) + + values['active'] = True + try: + with self.env.cr.savepoint(): + return template_user.with_context(no_reset_password=True).copy(values) + except Exception as e: + # copy may fail if asked login is not available. + raise SignupError(ustr(e)) diff --git a/tt_github_oauth_app/static/description/banner.gif b/tt_github_oauth_app/static/description/banner.gif new file mode 100755 index 0000000..111113f Binary files /dev/null and b/tt_github_oauth_app/static/description/banner.gif differ diff --git a/tt_github_oauth_app/static/description/icon.png b/tt_github_oauth_app/static/description/icon.png new file mode 100755 index 0000000..ea8ceed Binary files /dev/null and b/tt_github_oauth_app/static/description/icon.png differ diff --git a/tt_github_oauth_app/static/description/images/FAQ.svg b/tt_github_oauth_app/static/description/images/FAQ.svg new file mode 100755 index 0000000..608c957 --- /dev/null +++ b/tt_github_oauth_app/static/description/images/FAQ.svg @@ -0,0 +1 @@ +Asset 5 \ No newline at end of file diff --git a/tt_github_oauth_app/static/description/images/Hot-Features-icon.svg b/tt_github_oauth_app/static/description/images/Hot-Features-icon.svg new file mode 100755 index 0000000..bcc33df --- /dev/null +++ b/tt_github_oauth_app/static/description/images/Hot-Features-icon.svg @@ -0,0 +1 @@ +Hot-Features-icon \ No newline at end of file diff --git a/tt_github_oauth_app/static/description/images/KeyHighlights.png b/tt_github_oauth_app/static/description/images/KeyHighlights.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/Odoo-Community-Apps.svg b/tt_github_oauth_app/static/description/images/Odoo-Community-Apps.svg new file mode 100755 index 0000000..01e6309 --- /dev/null +++ b/tt_github_oauth_app/static/description/images/Odoo-Community-Apps.svg @@ -0,0 +1 @@ +Odoo-Community-Apps \ No newline at end of file diff --git a/tt_github_oauth_app/static/description/images/Odoo-Customization.svg b/tt_github_oauth_app/static/description/images/Odoo-Customization.svg new file mode 100755 index 0000000..4a3dcc0 --- /dev/null +++ b/tt_github_oauth_app/static/description/images/Odoo-Customization.svg @@ -0,0 +1 @@ +Odoo-Customization \ No newline at end of file diff --git a/tt_github_oauth_app/static/description/images/Odoo-Developer-Outsourcing.svg b/tt_github_oauth_app/static/description/images/Odoo-Developer-Outsourcing.svg new file mode 100755 index 0000000..5891b2b --- /dev/null +++ b/tt_github_oauth_app/static/description/images/Odoo-Developer-Outsourcing.svg @@ -0,0 +1 @@ +Odoo-Developer-Outsourcing \ No newline at end of file diff --git a/tt_github_oauth_app/static/description/images/Odoo-Implementation.svg b/tt_github_oauth_app/static/description/images/Odoo-Implementation.svg new file mode 100755 index 0000000..c23e231 --- /dev/null +++ b/tt_github_oauth_app/static/description/images/Odoo-Implementation.svg @@ -0,0 +1 @@ +Odoo-Implementation \ No newline at end of file diff --git a/tt_github_oauth_app/static/description/images/Odoo-Integration-Services.svg b/tt_github_oauth_app/static/description/images/Odoo-Integration-Services.svg new file mode 100755 index 0000000..53f3f82 --- /dev/null +++ b/tt_github_oauth_app/static/description/images/Odoo-Integration-Services.svg @@ -0,0 +1 @@ +Odoo-Integration-Services \ No newline at end of file diff --git a/tt_github_oauth_app/static/description/images/Odoo-Support-Maintenance.svg b/tt_github_oauth_app/static/description/images/Odoo-Support-Maintenance.svg new file mode 100755 index 0000000..cc974ba --- /dev/null +++ b/tt_github_oauth_app/static/description/images/Odoo-Support-Maintenance.svg @@ -0,0 +1 @@ +Odoo-Support-Maintenance \ No newline at end of file diff --git a/tt_github_oauth_app/static/description/images/Screenshot-icon.svg b/tt_github_oauth_app/static/description/images/Screenshot-icon.svg new file mode 100755 index 0000000..abd962f --- /dev/null +++ b/tt_github_oauth_app/static/description/images/Screenshot-icon.svg @@ -0,0 +1 @@ +Screenshot-icon \ No newline at end of file diff --git a/tt_github_oauth_app/static/description/images/Setup-icon.svg b/tt_github_oauth_app/static/description/images/Setup-icon.svg new file mode 100755 index 0000000..7b18317 --- /dev/null +++ b/tt_github_oauth_app/static/description/images/Setup-icon.svg @@ -0,0 +1 @@ +Setup-icon \ No newline at end of file diff --git a/tt_github_oauth_app/static/description/images/WorkFlow-icon.svg b/tt_github_oauth_app/static/description/images/WorkFlow-icon.svg new file mode 100755 index 0000000..ff7086c --- /dev/null +++ b/tt_github_oauth_app/static/description/images/WorkFlow-icon.svg @@ -0,0 +1 @@ +WorkFlow-icon \ No newline at end of file diff --git a/tt_github_oauth_app/static/description/images/apps.png b/tt_github_oauth_app/static/description/images/apps.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/auto-jobs.jpg b/tt_github_oauth_app/static/description/images/auto-jobs.jpg new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/bidirectional-sync.jpg b/tt_github_oauth_app/static/description/images/bidirectional-sync.jpg new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/custom.png b/tt_github_oauth_app/static/description/images/custom.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/customer-service.png b/tt_github_oauth_app/static/description/images/customer-service.png new file mode 100755 index 0000000..5e6027b Binary files /dev/null and b/tt_github_oauth_app/static/description/images/customer-service.png differ diff --git a/tt_github_oauth_app/static/description/images/customize.png b/tt_github_oauth_app/static/description/images/customize.png new file mode 100755 index 0000000..9b592cd Binary files /dev/null and b/tt_github_oauth_app/static/description/images/customize.png differ diff --git a/tt_github_oauth_app/static/description/images/dashboard1.png b/tt_github_oauth_app/static/description/images/dashboard1.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/dashboard2.png b/tt_github_oauth_app/static/description/images/dashboard2.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/description-icon.svg b/tt_github_oauth_app/static/description/images/description-icon.svg new file mode 100755 index 0000000..0dd9d12 --- /dev/null +++ b/tt_github_oauth_app/static/description/images/description-icon.svg @@ -0,0 +1 @@ +Description-icon \ No newline at end of file diff --git a/tt_github_oauth_app/static/description/images/description.png b/tt_github_oauth_app/static/description/images/description.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/develop.png b/tt_github_oauth_app/static/description/images/develop.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/dot-1.png b/tt_github_oauth_app/static/description/images/dot-1.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/dot-2.png b/tt_github_oauth_app/static/description/images/dot-2.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/dot-3.png b/tt_github_oauth_app/static/description/images/dot-3.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/dot-4.png b/tt_github_oauth_app/static/description/images/dot-4.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/floating-menu/Files.gif b/tt_github_oauth_app/static/description/images/floating-menu/Files.gif new file mode 100755 index 0000000..e6e5eca Binary files /dev/null and b/tt_github_oauth_app/static/description/images/floating-menu/Files.gif differ diff --git a/tt_github_oauth_app/static/description/images/floating-menu/Film.gif b/tt_github_oauth_app/static/description/images/floating-menu/Film.gif new file mode 100755 index 0000000..5a21c28 Binary files /dev/null and b/tt_github_oauth_app/static/description/images/floating-menu/Film.gif differ diff --git a/tt_github_oauth_app/static/description/images/floating-menu/Youtube.gif b/tt_github_oauth_app/static/description/images/floating-menu/Youtube.gif new file mode 100755 index 0000000..d6ad977 Binary files /dev/null and b/tt_github_oauth_app/static/description/images/floating-menu/Youtube.gif differ diff --git a/tt_github_oauth_app/static/description/images/floating-menu/bg-float.svg b/tt_github_oauth_app/static/description/images/floating-menu/bg-float.svg new file mode 100755 index 0000000..d712035 --- /dev/null +++ b/tt_github_oauth_app/static/description/images/floating-menu/bg-float.svg @@ -0,0 +1 @@ +Ads Layout2 \ No newline at end of file diff --git a/tt_github_oauth_app/static/description/images/highlights.png b/tt_github_oauth_app/static/description/images/highlights.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/integrated.png b/tt_github_oauth_app/static/description/images/integrated.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/integration.png b/tt_github_oauth_app/static/description/images/integration.png new file mode 100755 index 0000000..85c60c5 Binary files /dev/null and b/tt_github_oauth_app/static/description/images/integration.png differ diff --git a/tt_github_oauth_app/static/description/images/keep-in-mind-image.png b/tt_github_oauth_app/static/description/images/keep-in-mind-image.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/key-higlight-updated.png b/tt_github_oauth_app/static/description/images/key-higlight-updated.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/key-higlight.png b/tt_github_oauth_app/static/description/images/key-higlight.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/letter.svg b/tt_github_oauth_app/static/description/images/letter.svg new file mode 100755 index 0000000..2b6985d --- /dev/null +++ b/tt_github_oauth_app/static/description/images/letter.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tt_github_oauth_app/static/description/images/line.png b/tt_github_oauth_app/static/description/images/line.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/migrating.png b/tt_github_oauth_app/static/description/images/migrating.png new file mode 100755 index 0000000..0334223 Binary files /dev/null and b/tt_github_oauth_app/static/description/images/migrating.png differ diff --git a/tt_github_oauth_app/static/description/images/migration.png b/tt_github_oauth_app/static/description/images/migration.png new file mode 100755 index 0000000..da55d3b Binary files /dev/null and b/tt_github_oauth_app/static/description/images/migration.png differ diff --git a/tt_github_oauth_app/static/description/images/new-tag.gif b/tt_github_oauth_app/static/description/images/new-tag.gif new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/order-management.jpg b/tt_github_oauth_app/static/description/images/order-management.jpg new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/release.png b/tt_github_oauth_app/static/description/images/release.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/s1.png b/tt_github_oauth_app/static/description/images/s1.png new file mode 100755 index 0000000..dd8b4c4 Binary files /dev/null and b/tt_github_oauth_app/static/description/images/s1.png differ diff --git a/tt_github_oauth_app/static/description/images/s2.png b/tt_github_oauth_app/static/description/images/s2.png new file mode 100755 index 0000000..477147c Binary files /dev/null and b/tt_github_oauth_app/static/description/images/s2.png differ diff --git a/tt_github_oauth_app/static/description/images/s3.png b/tt_github_oauth_app/static/description/images/s3.png new file mode 100755 index 0000000..88158b1 Binary files /dev/null and b/tt_github_oauth_app/static/description/images/s3.png differ diff --git a/tt_github_oauth_app/static/description/images/s4.png b/tt_github_oauth_app/static/description/images/s4.png new file mode 100755 index 0000000..e31d705 Binary files /dev/null and b/tt_github_oauth_app/static/description/images/s4.png differ diff --git a/tt_github_oauth_app/static/description/images/smartphone.svg b/tt_github_oauth_app/static/description/images/smartphone.svg new file mode 100755 index 0000000..ba73a68 --- /dev/null +++ b/tt_github_oauth_app/static/description/images/smartphone.svg @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tt_github_oauth_app/static/description/images/support-1.png b/tt_github_oauth_app/static/description/images/support-1.png new file mode 100755 index 0000000..30699a6 Binary files /dev/null and b/tt_github_oauth_app/static/description/images/support-1.png differ diff --git a/tt_github_oauth_app/static/description/images/support.png b/tt_github_oauth_app/static/description/images/support.png new file mode 100755 index 0000000..039ae2f Binary files /dev/null and b/tt_github_oauth_app/static/description/images/support.png differ diff --git a/tt_github_oauth_app/static/description/images/support2.png b/tt_github_oauth_app/static/description/images/support2.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/tortecs-logo.jpg b/tt_github_oauth_app/static/description/images/tortecs-logo.jpg new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/tortecs-logo1.jpg b/tt_github_oauth_app/static/description/images/tortecs-logo1.jpg new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/tortecs_logo.jpg b/tt_github_oauth_app/static/description/images/tortecs_logo.jpg new file mode 100755 index 0000000..9f35783 Binary files /dev/null and b/tt_github_oauth_app/static/description/images/tortecs_logo.jpg differ diff --git a/tt_github_oauth_app/static/description/images/webhook.jpg b/tt_github_oauth_app/static/description/images/webhook.jpg new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/images/woocommerce-img-1.png b/tt_github_oauth_app/static/description/images/woocommerce-img-1.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/index.html b/tt_github_oauth_app/static/description/index.html new file mode 100755 index 0000000..d9de01c --- /dev/null +++ b/tt_github_oauth_app/static/description/index.html @@ -0,0 +1,512 @@ + + + + + + + Odoo + + + + + + + + + +
+
+
+
+ + tortecs-logo + +
+
+ + + Community + + + + Enterprise + +
+
+
+
+
+
+
+

+
+ + Login via GitHub +
+

+
+
+
+
+

+ Brought to you by - Tortecs +

+

+ If you have any requirements or need any support just email us to get your + work done with our deep expertise on odoo. +

+
+ +
+
+
+
+
+
+

+ This application offers user to login to odoo via GitHub using user's GitHub credentials. + User can now log into odoo just by clicking Log in with GitHub. +

+
+
+
+
+ +

+ User can not log into odoo via GitHub. +

+
+
+ +

+ With a single click login to GitHub without using any credentials. +

+
+
+
+
+ +

+ App uses browser entry for GitHub to Login +

+
+
+ +

+ Seamless Login Process. +

+
+
+
+
+ +

+ Control GitHub User login, whether they will be internal or portal users. +

+
+
+ +

+ Store GitHub users oauth token for future logins and repo access. +

+
+
+
+
+ +
+
+
+ + + +
+
+
+ +
+
+
+
+ + + When you have installed our application, + you just need to configure Oauth Providers which comes under Odoo Settings. +
+ Just Go to Settings > Oauth Providers (visible only in debug mode). +
+
+
+ info-image +
+
+
+ + + Enter the Client ID and Client Secret which is genereated by creating + an Oauth App on GitHub.
+ To Create an Oauth App on GitHub just click on below link :-
+ Creating Oauth Apps +

+ Also you can select the type of user you want, to be created when logging. + Here we have given two options :- Portal and Internal in the User Type field. +
+
+ info-image +
+
+
+
+
+ + + Now the Login with GitHub option will be visible on Odoo Login page. +
+ Click on the button and Authorize the odoo, and now you will be + successfully logged into Odoo via your GitHub. +
+
+ info-image +
+
+ info-image +
+
+
+
+
+
+
+
+
+
+

+ Frequently Asked Questions +

+
+
+
+
+
+
+
+ If I want any customizations whom should I contact ? +
+ + + +
+
+
+
+
+ Please drop email at tortecs.in@gmail.com, our response time + are very less with optimal supports. +
+
+
+
+
+
+
+
+ Can I run this app on Odoo Enterprise ? +
+ + + +
+
+
+
+
+ Yes, our app works with Odoo Enterprise as well as Community + versions. +
+
+
+
+
+
+
+
+ Do this app extendable ? +
+ + + +
+
+
+
+
+ We have designed this app in such a way that it can be easily + integrated with other odoo modules. +
+
+
+
+
+
+
+
+ Do this app supports any GitHub accounts ? +
+ + + +
+
+
+
+
+ Yes you can use any GitHub account whether its business or normal + account for GitHub logging on odoo. +
+
+
+
+
+
+
+
+
+
+ +
+
+

+ Note: +

+
+ Extensively Tested on Odoo Vanilla with Ubuntu OS +
+
+
+ +
+

Tortecs Services

+
+
+
+ support +
+
+
+ Odoo Implementation +
+
+
+
+
+
+
+ apps +
+
+
+ Odoo Migrations
+
+
+
+
+
+
+ support2 +
+
+
+ Odoo Support&Maintenance
+
+
+
+
+
+
+ custom +
+
+
+ Odoo Customization
+
+
+
+
+
+
+ integrated +
+
+
+ Odoo Integration Services
+
+
+
+
+
+
+
+ + tortecs.in@gmail.com +
+
+
+ +
+
+
+ + + + + diff --git a/tt_github_oauth_app/static/description/preview_images/img/Export-Customer.jpg b/tt_github_oauth_app/static/description/preview_images/img/Export-Customer.jpg new file mode 100755 index 0000000..f905fbb Binary files /dev/null and b/tt_github_oauth_app/static/description/preview_images/img/Export-Customer.jpg differ diff --git a/tt_github_oauth_app/static/description/preview_images/img/Export-Order.jpg b/tt_github_oauth_app/static/description/preview_images/img/Export-Order.jpg new file mode 100755 index 0000000..96c6bad Binary files /dev/null and b/tt_github_oauth_app/static/description/preview_images/img/Export-Order.jpg differ diff --git a/tt_github_oauth_app/static/description/preview_images/img/Export-Product.jpg b/tt_github_oauth_app/static/description/preview_images/img/Export-Product.jpg new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/preview_images/img/Import-Customer.jpg b/tt_github_oauth_app/static/description/preview_images/img/Import-Customer.jpg new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/preview_images/img/Import-Product.jpg b/tt_github_oauth_app/static/description/preview_images/img/Import-Product.jpg new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/preview_images/img/Import-Sale-Order.jpg b/tt_github_oauth_app/static/description/preview_images/img/Import-Sale-Order.jpg new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/preview_images/img/Sale-Order-Status.jpg b/tt_github_oauth_app/static/description/preview_images/img/Sale-Order-Status.jpg new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/preview_images/img/webhook.jpg b/tt_github_oauth_app/static/description/preview_images/img/webhook.jpg new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/setup/github1.png b/tt_github_oauth_app/static/description/setup/github1.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/setup/github2.png b/tt_github_oauth_app/static/description/setup/github2.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/setup/github3.png b/tt_github_oauth_app/static/description/setup/github3.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/setup/github4.png b/tt_github_oauth_app/static/description/setup/github4.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/setup/github5.png b/tt_github_oauth_app/static/description/setup/github5.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/setup/github6.png b/tt_github_oauth_app/static/description/setup/github6.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/setup/setupa.png b/tt_github_oauth_app/static/description/setup/setupa.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/setup/setupb.png b/tt_github_oauth_app/static/description/setup/setupb.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/description/setup/setupc.png b/tt_github_oauth_app/static/description/setup/setupc.png new file mode 100755 index 0000000..e69de29 diff --git a/tt_github_oauth_app/static/icon.png b/tt_github_oauth_app/static/icon.png new file mode 100755 index 0000000..ea8ceed Binary files /dev/null and b/tt_github_oauth_app/static/icon.png differ diff --git a/tt_github_oauth_app/views/tt_github_oauth_providers_views.xml b/tt_github_oauth_app/views/tt_github_oauth_providers_views.xml new file mode 100755 index 0000000..9beab20 --- /dev/null +++ b/tt_github_oauth_app/views/tt_github_oauth_providers_views.xml @@ -0,0 +1,15 @@ + + + + tt.oauth.form.view.inherit + auth.oauth.provider + + + + + + + + + + \ No newline at end of file