3 months later

Same problem here:
"View banned IP address list" and "Ban IP(s)" for Supermods, but they can't view the list. Of course, they can't go into the backend, which they shouldn't, but there could be a seperate Ban IP(s) List for them if the right has been gained.

    20 days later

    Still same problem 🙁 If i allow the permission Eg on admin group, the admin can't ban, didn't see the button and didn't see the banned ip lists.

      m4v3rick yes, that does make sense to make that permission work outside of the Admin CP especially for groups who can't view the Admin CP altogether 🙂

      Feel free to submit a PR or wait until we have time to enhance this specific feature.

      djalmasi the Banned IP list is currently only viewable in the Admin CP unfortunately 🙁 But, for your other issue, the one where you can't see the Ban IP button, are you trying to ban a user who is part of a group that cannot ban IP's? Please refer to datitisev's post with regards to what I'm asking 🙂

      Can you also post the output of php flarum info ran from the root directory of your Flarum install? This can help with troubleshooting while knowing what other extensions you might have installed that could be conflicting.

        Ralkage
        I allowed the permission, but the button does not appear.



        And if i open the menu, with a default serveradmin group.

          djalmasi yep, you are indeed correct, this is a bug.

          @datitisev I was able to reproduce this locally by creating a new group, giving that group the ability to ban users, assign a user to that new group, used FoF Impersonate to log in as that user who has this special group assigned to them, and alas no "Ban IP" button under PostControls for just banning normal users/members without this permission.

          Edit: Even though this new group has the permission to Ban IP's via PostControls, canBanIP still returns false for whatever reason. The canBanIP user attribute, on the other hand, is set to true for this user I was testing with.

          Only thing I can really think of right now is that this can be removed since there's already a canBanIP attribute via the UserSerializer that is already used for the permissions check. I'm not even sure how that post attribute is even able to return true in code or even changed in the UI. This line can also be changed to where !post.canBanIP is changed to !user.canBanIP which is the same permission check that is done in the UserControls section.

            Ralkage Feel free to submit a PR or wait until we have time to enhance this specific feature.

            Thanks for your answer. Right now I'm fine with waiting. We agreed on an internal workflow in the meantime.

            9 days later

            FriendsOfFlarum Note: This extension uses IPs from the posts posted by users. It does not track IP addresses itself.

            If I ban a user based on IP and then delete his spam post forever will he no longer be banned?

              MikeJones That's a good question. I think the extension also uses the IP header it some places, but I'm not entirely sure of where.

              I think I need to revisit the logic in this extension in the future.

              a month later

              0.3.0

              • beta 14 ready 🥳
              Updating
              composer require fof/ban-ips:^0.3.0
              php flarum cache:clear
                a month later

                0.4.0

                • Flarum beta 15 support
                a month later

                Hey, are there any news about modifying extension so ppl with permission to ban IP can ban IPs ? It would be highly appreciated as there is no alternate way for my mods to prevent spammers from accessing forum. Its vital feature for a keeping community healthy.

                  clarkwinkelmann
                  Indeed. I am not that familiar with github, am I able to create issue? If so I can give it a try, but my english is far from good, so... 😄

                  Add ability for users with permissions of ban IPs to ban IPs.

                  Is that good?

                  2 months later

                  Don't work on profile user? Because a try ban/unban an user and don't work, only on posts

                  a month later