Skip to content

Commit

Permalink
fix - Removal of api secrete keys in biostar settings, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
maniamartial committed Jun 29, 2024
1 parent 48b5fbe commit 891a29e
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 57 deletions.
26 changes: 0 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ This doctype is used to store the following configuration details:
1. **Username**: The user id used to log in to this page
2. **Password**: The password used to log in to this page
3. **TA URL**: The time and attendance URL
4. **API Key**: API key generated for the user
5. **API Secret**: API Secret generated for the user
6. **Start Date**: The start date for fetching attendance records
7. **End Date**: The end date for fetching attendance records

Expand All @@ -51,8 +49,6 @@ This application provides both scheduled tasks and manual functions to fetch and
2. **Fill in the required configuration details:**
- Username
- Password
- API Key
- API Secret
- Callback URL
- Start Date
- End Date
Expand Down Expand Up @@ -103,25 +99,3 @@ This integration not only enhances security and operational efficiency but also
bench --site [your-site-name] install-app navari_frappehr_biostar
```
4. Configure the "Biometric Settings" doctype with appropriate values.

Generate the API key and API secret and feed them in the TA Auth Details section.

```
To generate the keys above navigate to the "My Account" section
```

![Screenshot from 2024-05-10 12-49-05](https://github.com/navariltd/navari-frappehr-biostar/assets/82759762/ec9144e5-8ffd-4f0b-a5da-73ef8fcf2216)

```
Go to "Settings"
Click on "API Access" and Generate Keys
```
![Screenshot from 2024-05-10 12-49-19](https://github.com/navariltd/navari-frappehr-biostar/assets/82759762/ee40e69d-5b3a-48c1-b6f7-af9a2dae5849)

```
Add the generated keys to the Biometric Settings Form and save
```

![Screenshot from 2024-05-09 16-41-08](https://github.com/navariltd/navari-frappehr-biostar/assets/82759762/edbf8d78-3ad9-41ca-bdfb-fce7c2350ace)

5 changes: 0 additions & 5 deletions navari_frappehr_biostar/controllers/biostar_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,8 @@
SETTINGS_DOCTYPE = "Biostar Settings"
username = frappe.db.get_single_value(SETTINGS_DOCTYPE, "username")
password = get_decrypted_password(SETTINGS_DOCTYPE, SETTINGS_DOCTYPE, "password")
api_key = frappe.db.get_single_value(SETTINGS_DOCTYPE, "api_key")
api_secret = get_decrypted_password(SETTINGS_DOCTYPE, SETTINGS_DOCTYPE, "api_secret")
erpnext_instance_url = get_url().__str__()
ta_base_url = frappe.db.get_single_value(SETTINGS_DOCTYPE, "ta_url").__str__()
from frappe.core.doctype.server_script.server_script import setup_scheduler_events

from frappe.utils import get_first_day, get_last_day


class BiostarConnect:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ frappe.ui.form.on("Biostar Settings", {
frm.doc.username &&
frm.doc.password &&
frm.doc.ta_url &&
frm.doc.api_key &&
frm.doc.api_secret &&
frm.doc.start_date &&
frm.doc.end_date
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
"password",
"column_break_jltg",
"ta_url",
"ta_auth_details_section",
"api_key",
"column_break_jynp",
"api_secret",
"fetch_attendance_logs_section",
"start_date",
"column_break_vwvl",
Expand Down Expand Up @@ -50,25 +46,6 @@
"fieldtype": "Data",
"label": "TA URL"
},
{
"fieldname": "ta_auth_details_section",
"fieldtype": "Section Break",
"label": "TA Auth Details"
},
{
"fieldname": "api_key",
"fieldtype": "Data",
"label": "API Key"
},
{
"fieldname": "column_break_jynp",
"fieldtype": "Column Break"
},
{
"fieldname": "api_secret",
"fieldtype": "Password",
"label": "API Secret"
},
{
"fieldname": "fetch_attendance_logs_section",
"fieldtype": "Section Break",
Expand All @@ -92,7 +69,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2024-05-07 15:23:17.634835",
"modified": "2024-06-29 11:13:02.126918",
"modified_by": "Administrator",
"module": "Navari Frappehr Biostar",
"name": "Biostar Settings",
Expand Down

0 comments on commit 891a29e

Please sign in to comment.