Skip to content
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

Privacy policy on old gui's #362

Merged
merged 2 commits into from
Apr 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Change Log

## [v1.7.4](https://github.com/prey/prey-node-client/tree/v1.7.4) (2018-04-05)
## [v1.7.4](https://github.com/prey/prey-node-client/tree/v1.7.4) (2018-04-10)
[Full Changelog](https://github.com/prey/prey-node-client/compare/v1.7.3...v1.7.4)

**Merged pull requests:**

- Privacy policy on old gui's [\#362](https://github.com/prey/prey-node-client/pull/362) ([javo](https://github.com/javo))
- Wifi location strategy retry [\#356](https://github.com/prey/prey-node-client/pull/356) ([javo](https://github.com/javo))
- GDPR for client configuration [\#357](https://github.com/prey/prey-node-client/pull/357) ([javo](https://github.com/javo))
- Storage improvements [\#358](https://github.com/prey/prey-node-client/pull/358) ([javo](https://github.com/javo))
Expand Down
2 changes: 1 addition & 1 deletion lib/agent/plugins/control-panel/api/accounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var validate = function(data) {
else if (!data.password || data.password.length < 6)
return 'Password too short.';
else if (!data.policy_rule_privacy_terms)
return 'You need to accept the Terms & Conditions to continue';
return 'You need to accept the Terms & Conditions and Privacy Policy to continue';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seria bueno tener estos strings en un archivo de configuración json, como para no repetir cada vez lo mismo y cambiarlos en un solo lugar

else if (!data.policy_rule_age)
return 'You must be older than 16 years old to use Prey';
}
Expand Down
2 changes: 1 addition & 1 deletion lib/conf/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ var start = function(cb) {
cmd.parameters(['-n', '--name'], 'Name')
cmd.parameters(['-e', '--email'], 'Email')
cmd.parameters(['-p', '--password'], 'Password')
cmd.parameters(['-t', '--terms'], 'Accept terms and conditions (yes or y)')
cmd.parameters(['-t', '--terms'], 'Accept terms & conditions and privacy policy (yes or y)')
cmd.parameters(['-a', '--age'], 'Declare 16 or older (yes or y)')
cmd.parameters(['-c', '--country'], 'Country Name')
run_if_writable(cmd, account.signup);
Expand Down
24 changes: 19 additions & 5 deletions lib/conf/gui/linux/prey-config.glade
Original file line number Diff line number Diff line change
Expand Up @@ -374,12 +374,13 @@
</child>
<child>
<object class="GtkCheckButton" id="check_terms_conds">
<property name="width_request">495</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label">I agree to the</property>
<property name="label">I have read and agree to the and </property>
</object>
<packing>
<property name="x">150</property>
<property name="x">0</property>
<property name="y">220</property>
</packing>
</child>
Expand All @@ -390,20 +391,33 @@
<property name="label">I confirm that I am over 16 years old</property>
</object>
<packing>
<property name="x">150</property>
<property name="x">0</property>
<property name="y">240</property>
</packing>
</child>
<child>
<object class="GtkLinkButton" id="terms_conds">
<property name="width_request">163</property>
<property name="width_request">158</property>
<property name="height_request">30</property>
<property name="visible">True</property>
<property name="uri">https://www.preyproject.com/terms</property>
<property name="label">Terms and Conditions</property>
</object>
<packing>
<property name="x">262</property>
<property name="x">211</property>
<property name="y">217</property>
</packing>
</child>
<child>
<object class="GtkLinkButton" id="privacy_policy">
<property name="width_request">105</property>
<property name="height_request">30</property>
<property name="visible">True</property>
<property name="uri">https://www.preyproject.com/privacy</property>
<property name="label">Privacy Policy</property>
</object>
<packing>
<property name="x">394</property>
<property name="y">217</property>
</packing>
</child>
Expand Down
2 changes: 1 addition & 1 deletion lib/conf/gui/linux/prey-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def validate_new_user_fields(self):
self.show_alert(_("Passwords don't match"), _("Please make sure both passwords match."))
return False
if not self.get('check_terms_conds').get_active():
self.show_alert(_("Error"), _("You need to accept the Terms & Conditions to continue"))
self.show_alert(_("Error"), _("You need to accept the Terms & Conditions and Privacy Policy to continue"))
return False
if not self.get('check_age').get_active():
self.show_alert(_("Error"), _("You must be older than 16 years old to use Prey"))
Expand Down
16 changes: 11 additions & 5 deletions lib/conf/gui/mac/PreyConfig.app/Contents/MacOS/prey-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def drawRadio(self, title, default, tag, width, height):
return checkbox

def drawCheckbox(self, id, title, width, height):
checkbox = NSButton.alloc().initWithFrame_(NSMakeRect(13, 0, width, height))
checkbox = NSButton.alloc().initWithFrame_(NSMakeRect(0, 0, width, height))
checkbox.setButtonType_(NSSwitchButton)
checkbox.setTitle_(title)
self.inputs[id] = checkbox
Expand Down Expand Up @@ -400,7 +400,7 @@ def validate_new_user_fields(self, name, email, terms, age, passwd, passwd2 = No
self.show_alert("Please make sure both passwords match.")
return False
if terms != 'yes':
self.show_alert("You need to accept the Terms & Conditions to continue.")
self.show_alert("You need to accept the Terms & Conditions and Privacy Policy to continue.")
return False
if age != 'yes':
self.show_alert("You must be older than 16 years old to use Prey.")
Expand Down Expand Up @@ -453,10 +453,15 @@ def open_pass_recovery_url(self):
url = "https://panel.preyproject.com/forgot"
res = NSWorkspace.sharedWorkspace().openURL_(NSURL.URLWithString_(url))

def open_pass_terms_url(self):
def open_terms_url(self):
url = "https://www.preyproject.com/terms"
res = NSWorkspace.sharedWorkspace().openURL_(NSURL.URLWithString_(url))

def open_privacy_url(self):
url = "https://www.preyproject.com/privacy"
res = NSWorkspace.sharedWorkspace().openURL_(NSURL.URLWithString_(url))


######################################################
# tab clicks

Expand Down Expand Up @@ -494,8 +499,9 @@ def drawNewUser(self, tab, name):
elements.append(self.drawTextInput('name', 'Your name', 15, 150))
elements.append(self.drawTextInput('email', 'Email', 15, 105))
elements.append(self.drawPasswordInput('pass', 'Password', 15, 60))
elements.append(self.drawLink(NSMakeRect(110, 0, 125, 69), 'Terms & Conditions', 'open_pass_terms_url'))
elements.append(self.drawCheckbox('check_terms', 'I agree to the', 100, 70))
elements.append(self.drawCheckbox('check_terms', 'I have read and agree to the and', 335, 70))
elements.append(self.drawLink(NSMakeRect(181, 0, 124, 69), 'Terms & Conditions', 'open_terms_url'))
elements.append(self.drawLink(NSMakeRect(334, 0, 93, 69), 'Privacy Policy', 'open_privacy_url'))
elements.append(self.drawCheckbox('check_age', 'I confirm that I am over 16 years old.', 230, 25))

for element in flatten(elements):
Expand Down
Binary file modified lib/conf/gui/windows/prey-config.exe
Binary file not shown.