-
Notifications
You must be signed in to change notification settings - Fork 102
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
owner-email is functional only with public projects #75
Comments
I mean that will be nice that unregistered anonymous users would be able to write to private projects. |
I think this can be done by adding Anonymous Users group as a member to the private project. However, you'll end up breaking the intended functionality of the non-public setting. If disabling permission check in the rake task fetching the emails does not help, it will take some fiddling around to break the ACLs just a little. |
I don´t see a need for this with a proper user and role management of projects. |
Has anyone succeeded at receiving anonymous email information in the issue custom field owner-email in a private project and with Redmine version 3.0.x? I do not receive this information unless, as mentionned above, it is set as a public project. I tried vilppuvuorinen suggestion of adding Anonymous Users group as a member to the private project but it does not have any effect on the the issue custom field owner-email... Still no luck... It would be great to have a work around for that situation. Any suggestion? |
I haven't actually physically tested 3.0.x, but I believe the same errors are present in 2.6.x releases. The tests should be updated to point the latest released versions. As a quick fix I would suggest using a separate project for the issues for now. I would look into this out of interest if my schedule would allow at the moment. |
Thank you for your quick reply!! By the way, what did you mean by "it will take some fiddling around to break the ACLs just a little." ? Maybe I could try that! |
I would suggest taking a look in the unit tests. Creating a test case where one of the projects is set as private and adding an issue though email is attempted. This would provide extremely verbose output about the needed changes. It would also work as a template if it is possible to implement those changes and merge them. I can't really say if this is possible to perform without crippling the access control. |
I am not really setup to do this testing with unit tests right now. A separate project is not really an option for me right now neither... Too bad... Did you find anything interesting by the meantime? |
Well I ended up looking a clear explanation why this won't work in any easily controllable way. To provide some control over the email interface there is a The problem is that for example # Returns user's membership for the given project
# or nil if the user is not a member of project
def membership(project)
project_id = project.is_a?(Project) ? project.id : project
@membership_by_project_id ||= Hash.new {|h, project_id|
h[project_id] = memberships.where(:project_id => project_id).first
}
@membership_by_project_id[project_id]
end
[...]
# Return user's roles for project
def roles_for_project(project)
# No role on archived projects
return [] if project.nil? || project.archived?
if membership = membership(project)
membership.roles.dup
elsif project.is_public?
project.override_roles(builtin_role)
else
[]
end
end To work around this modifications would be needed at (currently) line 21 of mail_handler_patch.rb. Changing
to
However, this would partially break the intended functionality of the check. |
This was my issue too.. this fix works perfect with private projects! 10000 thanks and a beer for you :-) |
Thank you vilppuvuorinen for this work around! It will do the job for now on our side!! :) Regards |
The workaround also helps in my case. Thanks ;) |
* copied from jfqd#75 (comment) * fixes an issue we were seeing
We use current git version of the plugin and redmine 2.6.4. The issue is that owner-email is filled and helpdesk-first-reply is sent only when project has "public" status. It will be quite nice to use the functionality with private projects too.
The text was updated successfully, but these errors were encountered: