Re: svn commit: r584279 - in /maven/archiva/trunk/archiva-web: archiva-security/src/main/java/org/apache/maven/archiva/security/ archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/

2007-10-12 Thread Wendy Smoak
On 10/12/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Author: joakime
 Date: Fri Oct 12 14:35:41 2007
 New Revision: 584279

 URL: http://svn.apache.org/viewvc?rev=584279view=rev
 Log:
 [MRM-398] configure guest access by default for pre-configured repositories
 Newly added repositories are assigned to the guest user in read-only mode.

As mentioned on the issue comments, this isn't what was requested.
Brett and I both want a way to pre-configure guest access out of the
box for pre-configured repositories.

I don't think it's a good idea to make newly added repositories
visible by default.

-- 
Wendy


Re: svn commit: r584279 - in /maven/archiva/trunk/archiva-web: archiva-security/src/main/java/org/apache/maven/archiva/security/ archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/

2007-10-12 Thread Joakim Erdfelt

I can only think of 1 place for this.
When DefaultArchivaConfiguration loads the default-archiva.xml from its 
resources location and puts it into place.


Catch is, it will require pulling in redback-rbac all the way down to 
archiva-configuration.
Which means archiva-security will likely go away (merged with 
archiva-configuration), with the RoleManager work that Jesse did, it was 
inevitable for the archiva-security to go away.
But wait! there's more! Because of our use of a role with a resource, 
that means we have to pull in RbacManager too. (because RoleManager 
doesn't support that kind of assignment yet, see Jesse  Redback 
1.0-alpha-4 work)
Also, it means that every unit test that uses the 
DefaultArchivaConfiguration object will have to pull in the RoleManager, 
and RBACManager too.
And while we are loading those, we'll either need to configure a 
database everywhere, or use the memory role manager to avoid using the 
database.
Which in turn means that all of those component xmls everywhere will 
need to be touched, which at last count,


Big commit coming?
(back of the envelope math)
$ find . -name *.xml -exec grep -l DefaultArchivaConfiguration {} \; | 
wc -l

27
$ find . -name *.xml -exec grep -n DefaultArchivaConfiguration {} \; | 
wc -l

63

27 files, 63 usages of DefaultArchivaConfiguration.
Average of about 65 new lines needed per DefaultArchivaConfiguration 
definition.

65 * 63 = 4095 lines.
+ 27% diff overhead = 5200 lines

That should be a 4 part commit (once split by apache's commit message 
email split routines)

And that's the bare minimum work.
It's likely that archiva-security goes away, and archiva-configuration 
gains a bunch of security.


Ready for it?

- Joakim

Wendy Smoak wrote:

On 10/12/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  

Author: joakime
Date: Fri Oct 12 14:35:41 2007
New Revision: 584279

URL: http://svn.apache.org/viewvc?rev=584279view=rev
Log:
[MRM-398] configure guest access by default for pre-configured repositories
Newly added repositories are assigned to the guest user in read-only mode.



As mentioned on the issue comments, this isn't what was requested.
Brett and I both want a way to pre-configure guest access out of the
box for pre-configured repositories.

I don't think it's a good idea to make newly added repositories
visible by default.

  



--
- Joakim Erdfelt
 [EMAIL PROTECTED]
 Open Source Software (OSS) Developer



Re: Monster Commit Breakdown - svn commit: r583412 [1/8]

2007-10-12 Thread Maria Odea Ching
Thanks for this email Joakim :) It helped people to better understand 
all the recent changes in the codebase. I admit I have also panicked 
when I saw some of the classes I was using in my codes (that I still 
haven't committed yet) were removed, but after reading the past threads 
plus this email I think I know (at least) where to find or what to use 
in place for those classes.


Anyway, as what has already been mentioned by Brett and Wendy.. it 
would've been better to have the changes committed piece by piece 
instead of a giant commit as a lot of other developers/contributors 
would get affected especially since we're nearing the 1.0 release. I 
admit, I am also guilty of doing this at times and maybe we could all 
learn from this so-called 'monster commit panic' to practice committing 
our changes piece by piece :-)


-Deng

Joakim Erdfelt wrote:
This is an attempt to breakdown the monster commit to help people not 
fear it.


(Disclaimer: The views / opinions / rants herein are from a mad swede,
myself, and do not reflect the views of the other devs
and commitors in archiva.  Do not take the statements made
within this email as canon of how things operate within
archiva.  I have been merely asked to explain the monster
commit as it is out of form and considered harmful to
the project.)

 Was what I did wrong?  Probably.
 Was there a more appropriate way?  Probably.
 Was this a surprise commit?  No.
 Did this destablize the codebase?  No.
 Was the size of this commit excessive?  No. (1)
 Could I have split up this into different commits?  Probably. (2)
 Why did I do this?  Time. (3)
 Will I change?  Damn straight!

Technical Breakdown of commit:

 Label  Size  : Self : Overall
--:--:

Totals (overall):
 Change Blocks .. 362 :  : Property 
Changes  96 :  : Count Entries (Total) 
.. 131 :  : Count Entries Added 
. 32 :  24% : Count Entries Removed 
... 11 :   8% : Count Entries Modified 
.. 87 :  66% : Count Entries Property Change Only 
... 1 :   1% : Lines (Total)  19225 
:  : Lines of Diff Overhead  3994 :  21% :
 Lines Added (Total) .. 13126 :  68% : Lines Added 
from New Entries . 11519 :  60% : Lines Added from 
Modified Entries . 1607 :   8% : Lines Removed (Total) 
. 2105 :  11% : Lines Removed from Deleted Entries 
. 754 :   4% : Lines Removed from Modified Entries ... 1351 
:   7% : Lines Modified Delta (Added - Removed) . 256 :  :
 Lines of Comment Changes .. 1716 :   9% :   
Totals (src/main):

 Change Blocks .. 156 :  :  43%
 Property Changes  54 :  :  56%
 Count Entries (Total) ... 62 :  :  47%
 Count Entries Added . 18 :  29% :  14%
 Count Entries Removed  3 :   5% :   2%
 Count Entries Modified .. 41 :  66% :  31%
 Count Entries Property Change Only ... 0 :   0% :   0%
 Lines (Total) . 6680 :  :  35%
 Lines of Diff Overhead  1818 :  27% :   9%
 Lines Added (Total) ... 3815 :  57% :  20%
 Lines Added from New Entries .. 2884 :  43% :  15%
 Lines Added from Modified Entries .. 931 :  14% :   5%
 Lines Removed (Total) . 1047 :  16% :   5%
 Lines Removed from Deleted Entries . 210 :   3% :   1%
 Lines Removed from Modified Entries  837 :  13% :   4%
 Lines Modified Delta (Added - Removed) .. 94 :  : Lines of 
Comment Changes .. 1015 :  15% :   5%


Totals (src/test):
 Change Blocks .. 206 :  :  57%
 Property Changes  42 :  :  44%
 Count Entries (Total) ... 69 :  :  53%
 Count Entries Added . 14 :  20% :  11%
 Count Entries Removed  8 :  12% :   6%
 Count Entries Modified .. 46 :  67% :  35%
 Count Entries Property Change Only ... 1 :   1% :   1%
 Lines (Total)  12545 :  :  65%
 Lines of Diff Overhead  2176 :  17% :  11%
 Lines Added (Total) ... 9311 :  74% :  48%
 Lines Added from New Entries .. 8635 :  69% :  45%
 Lines Added from Modified Entries .. 676 :   5% :   4%
 Lines Removed (Total) . 1058 :   8% :   6%
 Lines Removed from Deleted Entries . 544 :   4% :   3%
 Lines Removed from Modified Entries  514 :   4% :   3%
 Lines Modified Delta (Added - Removed) . 162 :  : Lines of 
Comment Changes ... 701 :   6% :   4%


 (The code for