Commit graph

781 commits

Author SHA1 Message Date
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
Gavin D'souza
ebc220db39 refactor(tests): frappe.db.delete > frappe.db.sql
Use frappe.db.delete wherever possible. Get rid of all the frappe.db.sql ;)
This commit focuses on the tests written under the doctype specific
tests
2021-08-19 19:50:48 +05:30
mergify[bot]
bd6ed2033f
Merge pull request #13152 from shariquerik/wiki-based-desk
feat: Workspace 2.0
2021-08-13 06:44:32 +00:00
mergify[bot]
be5f7125cf
Merge pull request #13777 from jon-nfc/issue-13738
feat: Improve LDAP implementation to be standards compliant
2021-08-11 06:01:55 +00:00
shariquerik
5bed8031a2 fix: removed padding code from wspace json files & patch 2021-08-10 17:52:42 +05:30
shariquerik
bf4611e84b fix: updated wspace json files & minor onboarding fix 2021-08-06 14:07:22 +05:30
Shariq Ansari
cec1de0389
Merge branch 'frappe:develop' into wiki-based-desk 2021-08-05 11:30:18 +05:30
mergify[bot]
555bcc4153
feat: Improvements in Webhooks (backport #13320) (#13791)
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
2021-08-05 11:08:01 +05:30
shariquerik
84f195ca19 fix: Resolved Conflicts 2021-08-03 17:53:14 +05:30
Saqib Ansari
d6b4974bde refactor: use session.request to commonify code 2021-07-31 11:56:30 +05:30
Jon Lockwood
3beea20ddd feat(ldap): Validate additional required fields.
If the user selects 'Custom' LDAP Directory, when they hit save, validate the additional required fields ('ldap_group_objectclass' and 'ldap_group_member_attribute') for this selection to function.

Issue #13738
2021-07-30 10:59:23 +09:30
Jon Lockwood
172d1b31e8 test: LDAP unit-tests
Created unit tests for integration LDAP. These tests are designed to confirm that LDAP will continue to work after changes are made to frappe.

PR-#13777
2021-07-30 10:59:23 +09:30
Jon Lockwood
26b0fe3023 docs(ldap): update field to be a fdn
User can use any valid LDAP fdn to search. fields updated to refect.

issue #13738 PR-#13777
2021-07-30 10:59:23 +09:30
Jon Lockwood
c37e16bd09 feat(ldap): validate the user and group search path
to prevent exceptions in other locations, validate the user and group search paths at the timeof input.

issue #13738 PR-#13777
2021-07-30 10:59:23 +09:30
Jon Lockwood
99b141017f fix(ldap): fetch_ldap_groups attribute vallidation
Function requires attributes to be of type x, validate to ensure any changes will break function and to prevent further exceptions. Only output to console as it's only a developer who will generate this error.

PR-#13777
2021-07-27 11:18:32 +09:30
Jon Lockwood
1b2ec4ff77 feat(ldap): validate user fields that are ldap attributes
As the user provides some of the ldap attributes, validate those entries when the 'LDAP Settings' editor clicks save. Provide an error message if validation fails stating what is incorrect.

issue #13738 PR-#13777
2021-07-27 11:02:36 +09:30
Jon Lockwood
c0565ae2d3 fix(ldap): Don't reach outside of function for details supplied
A user object is passed to the function. Use this to derived the user details.

PR #13777
2021-07-27 10:21:08 +09:30
Jon Lockwood
ac5f85fa7a chore(ldap): remove unused var
sider #issue-5810499
2021-07-27 10:16:23 +09:30
Jon Lockwood
7927af30e1 fix(ldap): Don't reach outside function for user details
a user document is passed to the function. use this to derive user details

issue #13738
2021-07-26 17:34:07 +09:30
Jon Lockwood
5f6f6a77e5 fix(ldap): ldap3 exception
A blank password causes exception 'ldap3.core.exceptions.LDAPPasswordIsMandatoryError'. Validate the user input.

Issue #13738
2021-07-25 17:23:34 +09:30
Jon Lockwood
36c5b7fa09 feat(ldap): ldap search string validation
ldap search string is user input. validate to ensure is enclosed in '()', has the '{0}' placeholder and has the same number of brackets as used in complex ldap search strings.

issue #13738
2021-07-25 11:15:52 +09:30
Jon Lockwood
ba81929519 refactor(ldap): reuse existing connection
to confirm user credentials, use 'rebind' instead of re-connecting to ldap. This also enables unit testing of all functions except the connection to ldap.

issue #13738
2021-07-25 11:15:52 +09:30
Jon Lockwood
9ff38dec39 feat(ldap): sync ldap groups to roles
ldap_group_field set for depreciation.

issue #13738 fixes frappe/frappe#10794
2021-07-25 11:15:52 +09:30
Jon Lockwood
09cf8ee246 chore(ldap): typo
issue #13738
2021-07-25 11:15:52 +09:30
Jon Lockwood
05e978c5ec feat(ldap): validate LDAP search filter
Validate the LDAP search filter including enclosing in '()'. Note: if a user has a complex filter that misses the last ')' it will not be added. i.e. (&(objectclass=posixgroup)(uid={0}) is invalid but will pass validation.

issue #13738
2021-07-25 11:15:52 +09:30
Jon Lockwood
f971b8c456 feat(ldap): allow more complex ldap search filters
User needs to be able to conduct complex filtering. As long as the placeholder '{0}' for the username is included in the ldap search filter, the user can customize as required. searches must be enclosed in '()' i.e '(uid={0}) or '(&(objecttype=posixaccount)(uid={0}))' etc.

issue #13738 close frappe/frappe#6037
2021-07-25 11:15:52 +09:30
Jon Lockwood
a5085695bf refactor(ldap): ldap operations under base dn user
All LDAP operations should be done by ldap base dn user. This allows an administrator to lock down their directory to the user the LDAP operations are being conducted by.

issue #13738
2021-07-25 11:15:52 +09:30
Jon Lockwood
0914d8a296 refactor(ldap): use posixgroup
adjusted to posixgroup as openldap groups use objectclass 'posixgroup' for both a posix group and a samba group.

issue #13738
2021-07-25 11:15:52 +09:30
Jon Lockwood
68a5ac2b34 fix: username required
as part of the search the login/user name is required to find the user

issue #13738
2021-07-25 11:15:52 +09:30
Jon Lockwood
622800453a feat: new method to search for members ldap groups
New method to search for user group membership. Replaces old logic of using an ldap users attribute memberof which is not supported by all LDAP implementations

issue #13738
2021-07-25 11:03:47 +09:30
Jon Lockwood
1f0e0d23ed feat: update interface
Add new fields for the new group feature

issue #13738
2021-07-25 11:02:00 +09:30
Saqib Ansari
0fa9abde4c feat: add put request to integration utils 2021-07-13 14:35:16 +05:30
shariquerik
8475c6c426 fix: updated wspace json files 2021-07-08 17:41:22 +05:30
shariquerik
f2a91f5709 fix: updated wspace json files 2021-07-08 15:37:01 +05:30
barredterra
5592bf6b1c feat: remove "All" access from Google Settings 2021-06-29 18:43:20 +02:00
barredterra
d9044815f4 style: use double quotes 2021-06-29 18:42:43 +02:00
barredterra
b02d2715be test: remove test_picker_as_guest
Guest access was disabled. Testing this would be equivalent to testing frappe.whitelist.
2021-06-29 18:42:15 +02:00
barredterra
99594b0fd8 test: change test cases after interface change 2021-06-29 16:02:27 +02:00
barredterra
024b8960cd feat: links to google cloud console in description 2021-06-18 16:58:48 +02:00
barredterra
37dc0b12ef refactor: suggestions from review 2021-06-18 16:23:21 +02:00
barredterra
bd0839b111 Merge branch 'develop' into google_drive_picker 2021-06-18 15:44:11 +02:00
Gavin D'souza
c489846547 Merge branch 'develop' into unnecessary_comprehensions 2021-06-11 19:30:23 +05:30
Raffael Meyer
7f7e8ac36a
Merge branch 'develop' into google_drive_picker 2021-06-03 15:01:50 +02:00
Gavin D'souza
e407b78506 chore: Drop dead and deprecated code
* Remove six for PY2 compatability since our dependencies are not, PY2
  is legacy.
* Removed usages of utils from future/past libraries since they are
  deprecated. This includes 'from __future__ ...' and 'from past...'
  statements.
* Removed compatibility imports for PY2, switched from six imports to
  standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
  versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
2021-05-26 15:31:29 +05:30
Ankush Menat
ba1c11008f
feat: option to disable button in slack message
Add a checkbox that lets user disable button which has link to the
document.
2021-05-24 22:01:45 +05:30
Nabin Hait
6d7a852351 Merge branch 'version-13' into develop 2021-05-17 11:21:46 +05:30
Ankush Menat
4754ab71d1
perf(minor): remove unnecessary comprehensions
- remove several unnecessary comprehensions from functions that accept a generator.
- Using `[x for x in iter]` causes a list to be built first then passed to the outer function.
- `any` and `all` can take generator instead. This makes memory usage O(1) and actually makes these functions short-circuiting. E.g. if the first condition fails then `all` will immediately return false instead of evaluating all the entries.
- `sum`, `min`, `max` => memory usage become O(1)
- `list`, `set`, `.join()` => roughly halves memory usage, as list is not required to be built.
- lastly, it's two fewer characters to read/think about.
2021-05-12 20:38:18 +05:30
casesolved-co-uk
095994a86c fix: connected app auto_refresh credentials and mandatory fields 2021-05-11 10:14:56 +00:00
Revant Nandgaonkar
0fb703ae9d fix: sider issues
(cherry picked from commit 72fbcac70c)
2021-04-29 14:14:30 +00:00
Revant Nandgaonkar
f7fb2809f4 test: oauth2 pkce and openid
(cherry picked from commit bb483d59af)
2021-04-29 14:14:30 +00:00