Subversion Repositories DevTools

Rev

Rev 6773 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6773 Rev 6777
Line 36... Line 36...
36
'   Default data will be added at the end
36
'   Default data will be added at the end
37
Dim oJSON
37
Dim oJSON
38
Set oJSON = New aspJSON
38
Set oJSON = New aspJSON
39
Dim newitem
39
Dim newitem
40
 
40
 
41
Function canModify
41
Function canModify(cname)
42
    canModify = canActionInProject()
42
    canModify = canActionControl(cname)
43
    If NOT canModify Then
43
    If NOT canModify Then
44
        result = -4
44
        result = -4
45
        oJSON.data("error") = 1
45
        oJSON.data("error") = 1
46
        oJSON.data("emsgSummary") = "Permission denied"
46
        oJSON.data("emsgSummary") = "Permission denied"
47
        oJSON.data("emsgDetails") = oJSON.data("emsgSummary")
47
        oJSON.data("emsgDetails") = oJSON.data("emsgSummary")
Line 60... Line 60...
60
'   On Error Resule Next to catch errors that accur in the code
60
'   On Error Resule Next to catch errors that accur in the code
61
'
61
'
62
On Error Resume Next
62
On Error Resume Next
63
 
63
 
64
If (parOpr = "EnableProject") Then
64
If (parOpr = "EnableProject") Then
65
    If canModify() Then EnableProject
65
    If canModify("ConfigureReplication") Then EnableProject
66
ElseIf (parOpr = "RemoveProject") Then
66
ElseIf (parOpr = "RemoveProject") Then
67
    If canModify() Then RemoveProject
67
    If canModify("ConfigureReplication") Then RemoveProject
-
 
68
 
68
ElseIf (parOpr = "AddProject") Then
69
ElseIf (parOpr = "AddProject") Then
69
    If canModify() Then AddProject
70
    If canModify("ConfigureReplication") Then AddProject
70
ElseIf (parOpr = "EnableRelease") Then
71
ElseIf (parOpr = "EnableRelease") Then
71
    If canModify() Then EnableRelease
72
    If canModify("ConfigureReplication") Then EnableRelease
72
ElseIf (parOpr = "RemoveRelease") Then
73
ElseIf (parOpr = "RemoveRelease") Then
73
    If canModify() Then RemoveRelease
74
    If canModify("ConfigureReplication") Then RemoveRelease
74
ElseIf (parOpr = "AddRelease") Then
75
ElseIf (parOpr = "AddRelease") Then
75
    If canModify() Then AddRelease
76
    If canModify("ConfigureReplication") Then AddRelease
76
 
77
 
77
Else
78
Else
78
    oJSON.data("error") = 1
79
    oJSON.data("error") = 1
79
    oJSON.data("emsgSummary") = "Unknown JSON Operation"
80
    oJSON.data("emsgSummary") = "Unknown JSON Operation"
80
    oJSON.data("emsgDetails") = "JSON operation is not supported: " & parOpr
81
    oJSON.data("emsgDetails") = "JSON operation is not supported: " & parOpr