Modify

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#8663 closed defect (fixed)

Disable register link on the login page

Reported by: Thierry Michel Owned by: Steffen Hoffmann
Priority: normal Component: AccountManagerPlugin
Severity: normal Keywords: user registration link disable
Cc: Mitar Trac Release: 0.12

Description

There is no way to disable the register link on the login page without disabling the RegisterModule. Having a new boolean option into the trac.ini could solve the problem.

I added this option to the AccountModule

login_register_link = BoolOption('account-manager', 'login_register_link',
                                False, 'Set to True to enable register link on the login page.')

and use it like this into the LoginModule.process_request() method :

'registration_enabled': AccountModule(self.env
                                        ).login_register_link

Attachments (0)

Change History (11)

comment:1 Changed 13 years ago by Steffen Hoffmann

Keywords: user registration link disable added

I notice a possible bug, since the link is present for me even with the RegistrationModule disabled.

Why do you think, you'll need the module without the link? I'll take a look and should be able to fix the wrong logic in the first place, without another trac.ini option.

Please discuss further on, especially in case you feel, that I misunderstood your point.

comment:2 Changed 13 years ago by anonymous

@hasienda: I can confirm that I'm seeing the same bug you are -- even with the RegistrationModule disabled, the "Register" link will appear in the login page, which should not be the case.

I also cannot think of a reason why the appearance of the "Register" link would not be determined by the enabling or disabling of the Registration Module.

comment:3 Changed 13 years ago by Steffen Hoffmann

Yes, without the link you need to know, how to trigger the registration page, guess from code.. Impracticable, if you ask me.

Again, why bother, if only both - the module and the link - can work together? Until now this seem a pointless discussion, at least I fail to see your point. Enlighten me, please. :-)

comment:4 Changed 13 years ago by Steffen Hoffmann

See #6821 for a hint on the background of the bug mentioned here.

comment:5 Changed 13 years ago by Steffen Hoffmann

After more feedback I've reworked the new login page concept.

You'll get a boolean option login_opt_list, so you can switch off the list inside of the central login box.

comment:6 Changed 13 years ago by Steffen Hoffmann

Status: newassigned

comment:7 Changed 13 years ago by Steffen Hoffmann

(In [10304]) AccountManagerPlugin: Fix _enable_check() in RegistrationModule refs #6821 and #8663.

The functions name has been misleading, as it has been more like a sibling of _write_check() in AccountModule.

comment:8 Changed 13 years ago by Steffen Hoffmann

(In [10306]) AccountManagerPlugin: Do the real check, and compatible to Trac 0.11 too, refs #6821 and #8663.

Plugin components can be activated implicitly, if the code is located in the plugins directory of the enironment. Method ComponentManager.is_component_enabled returns None for such a case, so it's not at all a reliable method to detect component activation.

Special thanks to David Byrne for testing and for critical hints on the issue.

comment:9 Changed 13 years ago by Mitar

Cc: Mitar added; anonymous removed

comment:10 Changed 13 years ago by Steffen Hoffmann

Resolution: fixed
Status: assignedclosed

(In [10393]) AccountManagerPlugin: Releasing version 0.3, pushing development to 0.4.

This new feature release finally propagates a number of solutions into an official release, after some time of testing with trunk, so explicitely closes #442, #816, #2966, #3989, #4160, #6821, #7111, #8534, #8549, #8663, #8813, #8892, #8925, #8936 and #8939.

Should have made this months ago, but felt so many pending issues were too bad for a new release. But it has been a tremendous ticket burndown since last year, so it's really worth considering an upgrade now. See fresh changelog for details.

comment:11 Changed 13 years ago by Steffen Hoffmann

(In [10395]) AccountManagerPlugin: Releasing version 0.3, pushing development to 0.4.

This new feature release finally propagates a number of solutions into an official release, after some time of testing with trunk, so explicitely closes #442, #816, #2966, #3989, #4160, #6821, #7111, #8534, #8549, #8663, #8813, #8892, #8925, #8936 and #8939.

Should have made this months ago, but felt so many pending issues were too bad for a new release. But it has been a tremendous ticket burndown since last year, so it's really worth considering an upgrade now. See fresh changelog for details.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.