Subversion Repositories DevTools

Rev

Rev 5765 | Rev 5930 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5765 Rev 5902
Line 28... Line 28...
28
Dim sLink
28
Dim sLink
29
Dim parPkgId
29
Dim parPkgId
30
Dim PackageName
30
Dim PackageName
31
Dim imgLock
31
Dim imgLock
32
Dim DestroyPackage
32
Dim DestroyPackage
-
 
33
Dim CanDestroyProjectPackage
33
Dim CanDestroyPackage
34
Dim CanDestroyPackage
34
Dim hideRipple
35
Dim hideRipple
35
Dim rippleFilter
36
Dim rippleFilter
36
'------------ Constants Declaration -----------
37
'------------ Constants Declaration -----------
37
Const IMG_OFFICIAL = "<img src='images/i_locked.gif' width='7' height='10' hspace='5' vspace='2' alt='Package is official'>"
38
Const IMG_OFFICIAL = "<img src='images/i_locked.gif' width='7' height='10' hspace='5' vspace='2' alt='Package is official'>"
Line 202... Line 203...
202
					Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsRep.FieldIndex("pkg_version") )
203
					Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsRep.FieldIndex("pkg_version") )
203
					
204
					
204
					
205
					
205
                    ' Not in a project context
206
                    ' Not in a project context
206
                    ' Only god-like users will have this permission
207
                    ' Only god-like users will have this permission
207
					CanDestroyPackage = canShowControl( "DestroyPackage" )
208
					CanDestroyProjectPackage = canShowControl( "DestroyPackage" )
208
					
209
					
209
				  ' Descending order
210
				  ' Descending order
210
				  For i = lastRow To 0 Step -1
211
				  For i = lastRow To 0 Step -1
211
				  	imgLock = IMG_NOT_OFFICIAL
212
				  	imgLock = IMG_NOT_OFFICIAL
212
					If (aVersions( rsRep.FieldIndex("dlocked"), i ) = "Y")  OR (aVersions( rsRep.FieldIndex("dlocked"), i ) = "A") Then
213
					If (aVersions( rsRep.FieldIndex("dlocked"), i ) = "Y")  OR (aVersions( rsRep.FieldIndex("dlocked"), i ) = "A") Then
Line 219... Line 220...
219
                    '   Have suffiecient access (unusual)
220
                    '   Have suffiecient access (unusual)
220
                    '   They created it or is its owner
221
                    '   They created it or is its owner
221
                    '   The version is not in use by any release (allow to be in pendinf or WIP)
222
                    '   The version is not in use by any release (allow to be in pendinf or WIP)
222
                    '   [Not at the moment] The package was created less than xxxx days ago
223
                    '   [Not at the moment] The package was created less than xxxx days ago
223
                    '   Is not locked or Approved for Autobuild
224
                    '   Is not locked or Approved for Autobuild
-
 
225
                    CanDestroyPackage = CanDestroyProjectPackage
224
                    If CanDestroyPackage = false Then
226
                    If CanDestroyPackage = false Then
225
                        If  objAccessControl.UserId = aVersions( rsRep.FieldIndex("CREATOR_ID"), i ) OR objAccessControl.UserId = aVersions( rsRep.FieldIndex("OWNER_ID"), i )Then
227
                        If  objAccessControl.UserId = aVersions( rsRep.FieldIndex("CREATOR_ID"), i ) OR objAccessControl.UserId = aVersions( rsRep.FieldIndex("OWNER_ID"), i )Then
226
                            If aVersions( rsRep.FieldIndex("inuse"), i ) = 0 Then
228
                            If aVersions( rsRep.FieldIndex("inuse"), i ) = 0 Then
227
                                'If aVersions( rsRep.FieldIndex("age") , i ) < 1000 Then
229
                                'If aVersions( rsRep.FieldIndex("age") , i ) < 1000 Then
228
                                    If aVersions( rsRep.FieldIndex("dlocked"), i ) <> "Y" Then
230
                                    If aVersions( rsRep.FieldIndex("dlocked"), i ) <> "Y" Then
229
                                        If aVersions( rsRep.FieldIndex("dlocked"), i ) <> "A" Then
231
                                        'If aVersions( rsRep.FieldIndex("dlocked"), i ) <> "A" Then
230
                                            CanDestroyPackage = true
232
                                            CanDestroyPackage = true
231
                                        End If
233
                                        'End If
232
                                    End If
234
                                    End If
233
                                'End If
235
                                'End If
234
                            End If
236
                            End If
235
                        End If
237
                        End If
236
                    End If
238
                    End If