This repository has been archived by the owner on Nov 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 293
/
manifest.xml
133 lines (131 loc) · 7.83 KB
/
manifest.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?xml version="1.0" encoding="UTF-8"?>
<authdriver name="ftp" label="CONF_MESSAGE[FTP authentication]" description="CONF_MESSAGE[Authenticate users by validating their credentials against an FTP server.]" mixins="authdriver_commons" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
<client_settings>
<resources>
<i18n namespace="ftp_auth" path="plugins/auth.ftp/i18n"/>
</resources>
</client_settings>
<server_settings>
<param name="TEST_CONNEXION" type="button" choices="run_plugin_action:auth.ftp:testParameters" default="auth.ftp" label="CONF_MESSAGE[Test connection]" description="CONF_MESSAGE[Test connection to the FTP server]" mandatory="false"/>
<param name="FTP_LOGIN_SCREEN" type="boolean" label="CONF_MESSAGE[FTP Login Screen]" description="CONF_MESSAGE[Replace the default connection screen (username and passwrd) by a screen allowing users to enter their own FTP connection data (server, port, etc.)]" mandatory="true" default="false"/>
<param name="REPOSITORY_ID" type="select" choices="json_list:list_all_repositories_json" label="CONF_MESSAGE[Workspace]" description="CONF_MESSAGE[ID of the workspace used to validate credentials]" mandatory="true"/>
</server_settings>
<class_definition filename="plugins/auth.ftp/class.ftpAuthDriver.php" classname="ftpAuthDriver"/>
<registry_contributions>
<external_file filename="plugins/core.auth/standard_auth_actions.xml" include="actions/action[@name='back']" exclude=""/>
<client_configs>
<template element="ajxp_desktop" name="hide_remember_me" position="bottom"><![CDATA[
<style type="text/css"> form#login_form > div > div.SF_element:last-child{ display:none; }</style>
]]></template>
</client_configs>
<actions>
<action name="set_ftp_data">
<rightsContext noUser="false" userLogged="hidden" guestLogged="show" read="false" write="false" adminOnly=""/>
<processing>
<serverCallback methodName="setFtpDataCallback"/>
</processing>
</action>
<action name="login">
<processing>
<clientCallback prepareModal="true"><![CDATA[
var loginRedirect = AJXP_LOGIN_REDIRECT;
if(loginRedirect){
document.location.href=loginRedirect;
}else{
modal.showDialogForm('Log In', 'ftp_login_form',
function(oForm){
ajaxplorer.loadSeedOrCaptcha(oForm.down('#login_seed'), oForm.down('img#captcha_image'), oForm.down('div.dialogLegend'), 'before');
},
function(){
var oForm = modal.getForm();
var connexion = new Connexion();
connexion.addParameter("get_action", "set_ftp_data");
oForm.getElements().each(function(el){
if(el.name != "userid" && el.name!="password" && el.name != "get_action" && el.name!="login_seed"){
connexion.addParameter(el.name, el.getValue());
}
});
connexion.onComplete = function(transport){
ajaxplorer.actionBar.submitForm(oForm, true, function(transport){
ajaxplorer.actionBar.parseXmlMessage(transport.responseXML);
if(transport.responseXML && XPathGetSingleNodeText(transport.responseXML.documentElement, "logging_result/@value") == "-4"){
ajaxplorer.loadSeedOrCaptcha(oForm.down('#login_seed'), oForm.down('img#captcha_image'), oForm.down('div.dialogLegend'), 'before');
}
});
oForm.reset();
};
connexion.sendSync();
return false;
});
}
]]></clientCallback>
</processing>
</action>
<action name="login">
<processing>
<clientForm id="ftp_login_form"><![CDATA[
<div id="ftp_login_form" action="login" box_width="350">
<input type="hidden" name="get_action" value="login">
<input type="hidden" name="login_seed" id="login_seed" value="-1">
<div>
<table cellpadding="2" border="0" cellspacing="0" style="font-size:11px;margin-bottom:5px;">
<tr>
<td colspan="4">
<div class="dialogLegend" ajxp_message_id="ftp_auth.1">AJXP_MESSAGE[ftp_auth.1]</div>
</td>
</tr>
<tr>
<td align="right"><ajxp:message ajxp_message_id="ftp_auth.2">AJXP_MESSAGE[ftp_auth.2]</ajxp:message> </td><td colspan="3"><input type="text" name="FTP_HOST" style="width: 190px; padding:0px; margin-right: 10px;" class="dialogFocus"><ajxp:message ajxp_message_id="ftp_auth.8">AJXP_MESSAGE[ftp_auth.8]</ajxp:message> <input type="text" name="FTP_PORT" style="width: 25px; padding:0px;" value="21"></td>
</tr>
<tr>
<td align="right"><ajxp:message ajxp_message_id="181">AJXP_MESSAGE[181]</ajxp:message> </td><td><input type="text" name="userid" style="width: 100px; padding:0px;"></td>
<td align="right"><ajxp:message ajxp_message_id="182">AJXP_MESSAGE[182]</ajxp:message> </td><td><input type="password" name="password" style="width: 90px; padding:0px;"></td>
</tr>
<tr>
<td colspan="4">
<div class="dialogLegend" style="margin-top: 12px;" ajxp_message_id="ftp_auth.3">AJXP_MESSAGE[ftp_auth.3]</div>
</td>
</tr>
<tr>
<td align="right"><ajxp:message ajxp_message_id="ftp_auth.4">AJXP_MESSAGE[ftp_auth.4]</ajxp:message> </td><td><input type="text" name="PATH" style="width: 100px; padding:0px;" class="" value="/"></td>
<td align="right" style="padding-left:10px;"><ajxp:message ajxp_message_id="ftp_auth.5">AJXP_MESSAGE[ftp_auth.5]</ajxp:message> </td><td><input type="radio" name="FTP_SECURE" style="width: 12px; padding:0px;" value="FALSE" checked><label style="display:inline-block;width:27px;"> FTP</label><input type="radio" name="FTP_SECURE" style="width: 12px; padding:0px;" value="TRUE"><label style="display:inline-block;width:27px;"> FTPS</label></td>
</tr>
<tr>
<td align="right"><ajxp:message ajxp_message_id="ftp_auth.6">AJXP_MESSAGE[ftp_auth.6]</ajxp:message> </td><td><input type="text" name="CHARSET" style="width: 100px; padding:0px;" class="" value=""></td>
<td align="right"><ajxp:message ajxp_message_id="ftp_auth.7">AJXP_MESSAGE[ftp_auth.7]</ajxp:message> </td><td><input type="radio" name="FTP_DIRECT" style="width: 12px; padding:0px;" value="TRUE"><label style="display:inline-block;width:27px;">AJXP_MESSAGE[440]</label><input type="radio" name="FTP_DIRECT" style="width: 12px; padding:0px;" value="FALSE" checked><label style="display:inline-block;width:27px;">AJXP_MESSAGE[441]</label></td>
</tr>
</table>
</div>
</div>
]]></clientForm>
</processing>
</action>
<!-- OVERRIDE LOGOUT -->
<action name="ftp_logout" expireDefault="true">
<gui text="164" title="169" src="decrypted.png"
accessKey="" hasAccessKey="false" iconClass="icon-signout">
<context selection="false" dir="" recycle="false"
actionBar="false" contextMenu="false" infoPanel="false"
actionBarGroup="user" ajxpWidgets="UserWidget::logging_string">
</context>
</gui>
<rightsContext noUser="false" userLogged="only" guestLogged="hidden" read="false" write="false" adminOnly=""/>
<processing>
<clientCallback prepareModal="false"><![CDATA[
clearRememberData();
var connexion = new Connexion();
connexion.addParameter('get_action', 'ftp_logout');
connexion.onComplete = function(transport){
ajaxplorer.actionBar.parseXmlMessage(transport.responseXML);
};
connexion.sendAsync();
]]></clientCallback>
<serverCallback methodName="logoutCallback"/>
</processing>
</action>
</actions>
</registry_contributions>
<dependencies>
<pluginClass pluginName="access.ftp"/>
</dependencies>
</authdriver>