A feature of Domain Access I initially wanted was to treat the domain access for a user more globally, to the point they wouldn't be able to log in to a domain if they weren't assigned to that domain.

I noticed there was a 6.x sub-module in development that provided this: http://drupal.org/project/domain_bonus

I thought to write a version which works for both 6.x / 7.x, so here it is: http://drupal.org/sandbox/Rory/1426848

Hopefully it's suggestive of a positive direction for Domain Access. I'm interested to hear what people think, and if or how it will work for them.

Comments

vaibhavjain’s picture

Status: Needs review » Needs work

Hi Rory,

Please follow the instruction to apply for full project - http://drupal.org/node/1011698
You are missing on link to git repo.

klausi’s picture

Status: Needs work » Postponed (maintainer needs more info)

Have you tried to contact the maintainer of domain_bonus? It is recommended to join forces before creating yet another project. See also http://drupal.org/node/251466

sgabe’s picture

Hi!

Thank your for your work on this, Rory! I am a co-maintainer of Domain Bonus and I am absolutely open to the idea. :)

Though I would like to ask you to provide a patch which is the port of Domain Bonus: Login Restrict and not something totally different (e.g at least in the same namespace etc.).

Note that if we don't provide an option to enable/disable the login by domain affiliation, we should grant the bypass access check permission to the authenticated users by default during the installation. However in the name of consistency I think I would stick with the option on the user page. I think it is more flexible if certain users can bypass access check regardless of their role.

You should create different branches for each core version of your module and not to do something like

  • master (branch)
    • 6.x (folder)
    • 7.x (folder)

See the Git documentation for more information and best practices.

klausi’s picture

@sgabe: Please don't post the output of automated review tools like pareview.sh inline in a comment, as it just clutters the issue. Better add it as .txt attachment instead.

sgabe’s picture

@klausi: As you requested I am moving the review to this post with an attachment.

Here is a quick review of your module. You should use Coder module and be sure that your code is compliant to the Drupal Coding Standards.

It appears you are working in the "HEAD" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Get a review bonus and we will come back to your application sooner.

creaoy’s picture

Hi Rory,

I added you to maintainers list in domain bonus module. Please follow the instructions that sgabe put above first.

@sgabe Thanks for help!

Thanks, Johnny

Rory’s picture

@sgabe: Thank you very much for your feedback, especially on working under version specific branches.

I wrote initially to you that I'd like to bring the functionality of Domain Bonus: Login Restrict into its own module, i.e. this project I'm applying for.

I have some questions about the structure of bundling domain related but otherwise unrelated modules together in a project like Domain Bonus.
- How do you navigate the mixed issue queue?
- When you have a new version of a sub-module, does that require a new version of the entire package to be released?

I may be uneducated on the advantages / dis-advantages of this approach - the whole branch system you've brought to my attention suggests its possible to maintain independent sub-streams of development within a single project... so hopefully this is possible! Development needs as much nurturing as possible.

sgabe’s picture

Domain Bonus is a package of several modules. As I mentioned we should create a new branch for Drupal 7 and we should commit your module which should be named Login Restrict and a port of the original module.

- How do you navigate the mixed issue queue?

We can set up per module components for each module in the package. Though as you can see there isn't much activity, since these are small modules and usually they are just working fine.

- When you have a new version of a sub-module, does that require a new version of the entire package to be released?

Yeah and see my previous note.

What can I say is that we can support the porting of Login Restrict (you have already maintainer access to Domain Bonus thanks for creaoy) as an answer to klausi's request in #2.

Rory’s picture

Rightio OK. In regards to your earlier review:

I had previously run my code through Coder and had no issues. There is one silly "Implements" line in one of my .info files I forgot to take out, but the other tools you've mentioned, PAReview and Drupal Code Sniffer - I'm not sure if you attached the issues you found, but you wrote "See attached." - were they attached? Are the results of PAReview and that, one and the same? I'm not familiar with either of these tools just yet, but I will be soon enough.

I'm running a free copy of the Text Wrangler at the moment. That line ending issue reported above came out of nowhere. How might I master these line breaks? What tool found that issue?

@creaoy: Thank you for the access but I don't know how to utilise it, just yet. Learning to swim like a little fishy, I am.

sgabe’s picture

See the attachment in #5.

Rory’s picture

@sgabe: Have made good sense of what to do, thanks, but had some trouble with git.

Cloning wasn't working with 'http://'. I was getting 'fatal: HTTP request failed'. According to this source I had to change the protocol from 'http://' to 'git://', and well, that worked and I was able to clone the master branch.

The remote repository there is now set to 'git://drupalcode.org/project/domain_bonus.git'. When I try to push I get 'fatal: The remote end hung up unexpectedly'. I'm sure I'm missing my username somewhere, and I've tried a few things, e.g. 'Rory@drupalcode.org...' but nothing yet has succeeded.

h3rj4n’s picture

How is it going with this project Rory? Still in development?

Is it possible for me to download it somewhere? Could really use this functionality.

Rory’s picture

Category: task » support
Status: Postponed (maintainer needs more info) » Active

In my efforts to establish myself as maintainer here, I haven't received any response regarding my issue with git.

I can send you what I've got. Just message me your email address via this link (you'll need to be logged into Drupal.org for that link to work) and hopefully you will benefit from it. The Domain Access project deserves plenty of attention.

patrickd’s picture

Category: support » task
Status: Active » Postponed (maintainer needs more info)

This issue is only for application purposes, leave it's category as it is please.

Have you tried:
git clone --recursive --branch 6.x-1.x Rory@git.drupal.org/project/domain_bonus.git
?

Did you change your username since your registration? maybe you still have to use the old name instead of Rory in that url.

can you give us any more detailed information about you problem?

Rory’s picture

Status: Postponed (maintainer needs more info) » Needs review

OK, I was having a problem with pushing files. However, I managed to create a 7.x-1.x branch and have now pushed files to the server in this branch.

@sgabe - I didn't manage to install PAReview.sh, but I did run the files through Coder and there seem to be no issues.

At this point I'll await further review.

If anyone else can benefit from this, here are the steps I performed to 1) create a new branch of the existing module, and 2) push my files into this branch:
1. Created a git working directory, and entered that directory.
2. Initialised the repository with: 'git init'
3. Configured my git username and email with: 'git config --global user.name "[my_username]"' and 'git config --global user.email [my_email]'.
4. Connected to the Drupal.org project repository with: 'git remote add origin Rory@git.drupal.org:project/domain_bonus.git'
5. Created a 7.x-1.x development branch with: 'git checkout -b 7.x-1.x'
6. Placed module files into git working directory.
7. Staged module files in local repository with: 'git add .'
8. Committed module files in local repository with: 'git commit -m "Initial commit."'
9. Pushed module files to the remote server with: 'git push origin 7.x-1.x'

caseyc’s picture

Rory, I'm glad you got git working. I went through the same thing when I first got started here. Unfortunately, you're pushing to the wrong place.

Please review the application instructions, which was referred to in Comment #5. In particular look at the info on sandbox projects. You already created a sandbox project, branches to your code should go there. Your sandbox project has more specific instructions.

I know this is a lot of reading. Drupal is rather demanding with its workflow. But the result is a system that works very well . . . once you get the hang of it!

My recommendations:

  • push your 7.x branch to the sandbox, then we can review properly.
  • Not sure what a "free" copy of Text Wrangler is, they're all free. In any case you don't need a rich text editor for Drupal development. I assume you're on Mac OS X; just try the built in TextEdit application. It will handle line breaks properly. It should also do some syntax highlighting for you.
  • You don't need to "install" pareview, just use the online version: http://ventral.org/pareview
sgabe’s picture

I think this is fixed since Rory's work is already available in Domain Bonus.

klausi’s picture

Status: Needs review » Closed (duplicate)

Closing this application as duplicate of domain_bonus, feel free to re-open if you think otherwise.

klausi’s picture

Issue summary: View changes

Changed references to Domain Access to project page links.

avpaderno’s picture

Issue summary: View changes
Status: Closed (duplicate) » Closed (won't fix)
Issue tags: -user, -domain, -access, -validation, -login
avpaderno’s picture

Title: Domain Access Login » [D6] Domain Access Login