Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow to manage devices (unregister) when reaching max nodes #6860

Merged
merged 3 commits into from
Feb 1, 2022

Conversation

julsemaan
Copy link
Collaborator

Description

allow to manage devices (unregister) when reaching max nodes

Impacts

Captive portal

Delete branch after merge

YES

NEWS file entries

New Features

  • Allow to manage devices (unregister) when reaching max nodes

@julsemaan
Copy link
Collaborator Author

@fdurand, if you have time to review this for 11.2, lets do it, otherwise we bump to 11.3

@@ -138,6 +138,11 @@
:text="$i18n.t('Under most circumstances we can redirect the user to the URL he originally intended to visit. However, you may prefer to force the captive portal to redirect the user to the redirection URL.')"
/>

<form-group-show-manage-devices-on-max-nodes namespace="show_manage_devices_on_max_nodes"
:column-label="$i18n.t('Show manage devices options when user reaches max nodes')"
:text="$i18n.t('When the user reaches the maximum amount of nodes for his username, enabling this will display an option in the portal to access the status page to manage/unregister devices.')"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the user reaches the maximum amount of nodes for his username => When the user reaches the maximum amount of registered nodes associated with his or her username

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about non binary?

@@ -244,6 +244,11 @@ sub apply_new_node_info {
my ($self) = @_;
get_logger->debug(sub { use Data::Dumper; "Applying new node_info to user ".Dumper($self->new_node_info)});

if(pf::node::is_max_reg_nodes_reached($self->current_mac, $self->new_node_info->{pid}, $self->new_node_info->{category})) {
$self->render("max-nodes-reached.html", { show_manage_devices => $self->app->profile->showManageDevicesOnMaxNodes });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks that max-nodes-reached.html is missing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@fdurand fdurand merged commit c6528e2 into devel Feb 1, 2022
fdurand added a commit that referenced this pull request Feb 1, 2022
@satkunas satkunas deleted the feature/max-nodes-manage-devices branch May 15, 2024 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants