{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Developer Portal (Drupal-based) /
avatar image
2
Question by James B Robinson · Mar 04, 2017 at 12:07 AM · 133 Views Portals - Drupaldevelopersdeveloper portal code access

How can I disable developer account creation in the NEW developer portal?

We create developer accounts on our own platform and then use the Apigee Management API to create the account at Apigee. This allows us to control a variety of things to ensure that the developer accounts match and have appropriate access to backend resources. Sadly for us this process breaks if the eager developer has already created an account directly on the Apgigee Developer Portal.

I can't find either the /login or the /create page so I'm not sure how to fix this. I have tried adding a /create page of my own, but the default /create page seems to be the one that gets called.

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

2 Answers

  • Sort: 
avatar image
2

Answer by ZACHARY HOROWITZ · Mar 21, 2017 at 02:52 PM

We also had a similar need to disable account creation on the "new" developer portal. A quick little css hack to simply remove the sign up link on the bottom of the login form served our needs for now.

To implement this css hack navigate to the portal "theme" page where you can modify/overwrite the css and append the following:

#login-form p.text-center { display: none !important }

In addition to removing the ability to create an account we didn't want any of the developer portal pages to be viewed by anyone who didn't already have an account. To do this we implemented the following javascript hack which redirects all pages to the login form if the user is not already logged in.


<script type="text/javascript">
<!--//
function getQueryParam(name) {
    var url = window.location.href;
    name = name.replace(/[\[\]]/g, "\\$&");
    var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results = regex.exec(url);
    if (!results || !results[2]) return '';
    return decodeURIComponent(results[2].replace(/\+/g, " "));
}




function isLoginVerified(){
              console.log('verifying login');
		var t = readCookie('portalSession');
		if ((t && t.length) || window.location.pathname=='/login') {
			var jqxhr = $.post(api + "/validate", {"token": t})
				.done(function (res) {
					return;
				})
				.fail(function (res) {
					window.location='/login';
				});
		} else if( window.location.pathname!='/login'){
			window.location='/login';
		}
}


$(document).ready(function(){
    var qt = getQueryParam('t');
    if( window.location.pathname!=='/login' && !qt.length ) isLoginVerified();
    $(document).on('mousedown','a',function(e){
	//console.log(e);
        isLoginVerified(e);
    });
});
//-->
</script>
Comment
Add comment Show 2 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Dino ♦♦   · Mar 21, 2017 at 03:53 PM 0
Link

Short and sweet! Thanks for this.

avatar image Anil Sagar @ Google ♦♦   · Mar 22, 2017 at 06:30 AM 0
Link

Nice hack @ZACHARY HOROWITZ , Thank you for sharing with community, +1

avatar image
0

Answer by Anil Sagar @ Google   · Mar 04, 2017 at 10:57 AM

@James B Robinson ,

As far as i know, It's NOT supported as of today in New Developer Portal. Apigee Developer Portal based on Drupal supports above features out of the box.

@Marsh Gardiner / @Chris Novak, Any thing you would like to add here ? Any plans to have these as settings in New Developer Portal ?

Comment
Add comment Show 2 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image marshg@google.com ♦♦ · Mar 05, 2017 at 07:57 PM 0
Link

Yes, there are no controls for registration new portals, but this is something we're working on. @James B Robinson, if developer registration required admin approval, would that solve your problem? Or do you need to be able to disable the create page entirely?

A very hacky way to do this would be to write some custom javascript in the portal settings page that would remove the login element and replace it with a notice. This is by no means elegant, as it would run on every page, but it might help in your specific case.

avatar image James B Robinson · Mar 06, 2017 at 10:05 PM 0
Link

Admin approval would be better than nothing. Removing (or hiding) the create page and its links would be best. We may get around to doing this in our already extensive and hacky custom javascript.

Follow this Question

Answers Answers and Comments

48 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Update developer does not work 1 Answer

Using a Custom Theme for the Drupal-based Developer Portal 1 Answer

Prebuilt (non-Drupal) Dev Portal enhancements 1 Answer

Is it possible to store developer apps also in my database, maybe callback URI?,Store developer applications to own database 1 Answer

Developer Portal - Internal vs External API Product Listings 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2019 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Members
  • Badges