Closed (fixed)
Project:
Drupal.org CVS applications
Component:
new project application
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Dec 2009 at 03:48 UTC
Updated:
17 Oct 2019 at 10:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
fizk commentedComment #2
DWSR commentedA good idea to me. The current names listed are a good start, I would also like to recommend adding:
- toor
- superadmin
- op
- operator
- oper
Comment #3
ilo commentedHi, just have five minutes and would love to help on this..
I just stopped doing the coding standard review here. but I realized other 'hard to categorize' issues also:
This placeholders usage generates errors when no rule is selected, this code is spreaded all over the code.
and, in the menu entry definition..
Looks a little bit messy, only uid 1 is able to use the module, because uid = 1, any attempt from banlist_access_callback to call user_access will fail using an empty $permission argument.
After some tests, the module just shows a checkboxes fixed list with names for user rules. If you add your own rules, the module just ignores them. It makes enable/disable these rules quicker and eassier as it is done through a checkbox.
In general module requires more love, IMO.. but I'd also suggest put something about 'community' now that you mention, what about import/export features for access rules instead of just another interface?
I'd also recommend to include a readme, or some doc, there is no way to know what the module is expected to be done for things like that of uid 1..
Comment #4
ilo commentedoh, I forgot to mention, some functions are using different namespace:
I guess they are helpers, so they should be changed according to naming convention.
Comment #5
avpadernoA note about ilo's comments (which are correct):
Comment #6
avpadernoComment #7
fizk commentedThanks for all your comments!
I've made all the changes, except for the $placeholders. I'm not sure what the Drupal function is, but when I find out, I'll change that part of the code.
Here's the updated version.
Comment #8
avpadernoThe function is
db_placeholders().Comment #9
fizk commented- fix for when no masks are selected.
Comment #10
fizk commented- fix placeholders
Comment #11
avpadernoIt should be enough to use
if (!isset($account)) {.Also, that is not the style suggested by the coding standards.
WHy isn't the code using directly
banlist_form()in the menu callback definition?Comments should have a period, at the end of the sentence.
For queries that select distinct elements there is a Drupal function that builds the query, and which should be used.
I already reported about the placeholders.
The correct code is
Comment #12
fizk commentedThanks, I've made all the changes, except #4 and #5. Please let me know what the Drupal function is for #5.
I've also added a README.txt and LICENSE.txt
Comment #13
fizk commentedTo do #4, I would remove the delete link from admin/user/rules for masks created by this module.
But I rather add a 'disable' link in core for all rules, so you could edit, delete, or disable a rule. It'd probably require one more field in the table.
Comment #14
avpadernoThe function is
db_distinct_field().The file LICENSE.txt needs to be removed; Drupal.org CVS doesn't allow to commit that file.
The code could add a field more in the table used; that would not create any compatibility problems; just don't give to the field a name already used for the same table in Drupal 7.
Comment #15
fizk commentedLooks like Drupal 7 doesn't use the "access" table.
Comment #16
fizk commentedI've looked at
db_distinct_field()and it's too complicated for my use here.Comment #17
fizk commentedAlrighty, #4 is going to take me a little time to finish.
Can we give this module the stamp of approval in the mean time, or is there something else I missed?
Comment #18
fizk commented- remove LICENSE.txt
Comment #19
fizk commented- remove LICENSE.txt
Comment #20
avpadernoThe code can be optimized; if the account to check is not passed, then the
$account->uid == $user->uidis verified.The code could be better written as
Comment #21
fizk commented- fix banlist_access_callback()
Comment #22
avpadernoAs pointed out from sun, there is already at least one module with the same purpose.
Comment #23
fizk commentedWhich modules?
Comment #24
sunok, I now went through 20 more search result pages with the most precise search phrase I could think of and I couldn't find the module I found some months ago, so let's proceed here, and re-revert this decision.
Sorry for the annoyance, but most often, it's better for all of us to prevent duplicate efforts.
Comment #25
avpadernoI still think there is a duplicate, until the module doesn't automatically update the list of usernames to ban.
Comment #26
dave reidBTW, the D7 version is http://drupal.org/project/user_restrictions since it was removed from core.
Comment #29
avpadernoI am giving credits to the users who reviewed these applications. I apologize for bumping this issue.