not set on the INSERT.
- OUT: Only sets the ID on the passed session and returns it. (`CreatedAt`, `AccessedAt`, are not set.)
New version:
```go
func (ds *Datastore) NewSession(ctx context.Context, userID uint, sessionKey string) (*fleet.Session, error) {
sqlStatement := `
INSERT INTO sessions (
user_id,
` + "`key`" + `
)
VALUES(?,?)
`
result, err := ds.writer.ExecContext(ctx, sqlStatement, userID, sessionKey)
if err != nil {
return nil, ctxerr.Wrap(ctx, err, "inserting session")
}
id, _ := result.LastInsertId() // cannot fail with the mysql driver
return ds.sessionByID(ctx, ds.writer, uint(id))
}
```
- IN: Define arguments that are truly used when creating a session.
- OUT: Load and return the fleet.Session struct with all values set (using the `ds.writer` to support read replicas correctly).
PS: The new `NewSession` version mimics what we already do with other entities, like policies (`Datastore.NewGlobalPolicy`).
* Ritual Heading with OKR planning subheading
Proposing to add the ritual heading to handbook/people in line with [https://github.com/fleetdm/confidential/issues/1013] and [https://github.com/fleetdm/fleet/issues/4671].
cc: @hollidayn
* Ritual update
Added OKR planning context and ritual steps to "Ritual" section of handbook.
* Move ritual section above Slack channels
Co-authored-by: Eric <eashaw@sailsjs.com>
* Orbit: Add Fleet Desktop support to Windows
* Rename workflow, fix linux build
* Do not compile systray on linux
* nolint on unused
* Fix lint properly
* nolint both checkers
* Fix monitor logic in desktopRunner
* Fix interrupt and execute order
* Simplified community contributions section
Simplified to 8th grade reading level from 10th+ and to 314 words from 349 words
* Update community.md
All edits are recorded by line:
197 added “,” after “change”
198 added “,” after “Also’; added “,” after “Usually”
199 added “,” after “needs”; added “a” before “changes”
200 added “,” after “Next”
206 replaced “Merges for minor documentation updates or bug fixes are usually done by the Fleet team.” with “The Fleet team usually does Merges for minor documentation updates or bug fixes”
* Revised simplified community contributions section
Added Mike and Desmi's changes
* Update community.md
All edits are recorded by line:
206 replaced “The Fleet team usually does Merges for minor documentation updates or bug fixes “ with Everyone can contribute bug fixes and improvements to the documentation, whether or not they work for Fleet.
Co-authored-by: Desmi-Dizney <99777687+Desmi-Dizney@users.noreply.github.com>
Renaming a temporary file to the final destination does not always work.
Specifically, if the source and destination paths are on different file
systems, you will get the following error
invalid cross-device link
Instead, create temporary file in the destination directory.
* base logic to handle rendering a notification without redux
* removed dispatches for new flash mesage triggers
* query page wrapper is no longer needed
* refactored confirm invite page to remove redux
* refactored email token redirect to functional and typescript
* refactored pack composer page to functional and typescript
* clean up
* lint fixes
* tests no longer needed
* fixed confirm sso invite test
* test fix
* fixed test
* fixed tests
* removed redux from flash on rebased pages
* Weekly community-driven docs update for week ending March 25th
* Update Configuration.md
* Update FAQ.md
All edits are recorded by line:
192 added “-“ to “auto-updates”
194 added “-“ to “auto-updates”; deleted “,” after “(easy)”; replaced “reccomend” with “recommend”
209 added “,” after “work”
211 replaced “am I seeing” with “do I see”
225 replaced “The best way to maintain historical data currently would be to use the [REST API](./REST-API.md) or the [`fleetctl` CLI](./fleetctl-CLI.md) to manually retrieve and save the data you need on your schedule. “ with “Currently, Fleet only stores the current state of your hosts (when they last communicated with Fleet). The best way at the moment to maintain historical data would be to use the [REST API](./REST-API.md) or the [`fleetctl` CLI](./fleetctl-CLI.md) to retrieve it manually. Then save the data you need to your schedule.”
* Update FAQ.md
All edits are recorded by line:
194 deleted ”either” after “disabled”
* Update fleetctl-CLI.md
All edits are recorded by line:
28 deleted “of the” after “many”; replaced “User Interface” with “UI(User Interface)”; replace “, and to” with “. You can even”
43 capitalized “Fleet”
63 replaced “info” with “information”
* Additional context for help menu and add table
Tweaked wording around using the help command and moved available commands in to a table. @DominusKelvin @Desmi-Dizney
* Update Configuration.md
space
* Final grammar revision
Co-authored-by: Desmi-Dizney <99777687+Desmi-Dizney@users.noreply.github.com>
* Added bullet point list.
* Update customers.md
All edits are recorded by line:
16 replaced “Team” with “team”; replaced “Oncall” with “oncall”; replaced “Technician” with “technician”
17 replaced “Oncall” with “oncall”; replaced “Technician” with “technician”
* Add instructions for creating and using an API-only user with fleetctl
* Update fleetctl-CLI.md
* Update example responses for policies and teams
* Update fleetctl-CLI.md
This was a super clean edit!
All edits are recorded by line:
199 replaced “passing” with “picking”; added “,” after “email”
253 replaced “:” with “.”
* Update fleetctl-CLI.md
Line 253 I changed "." to ":"
* Change `Create a new context for your standard user (optional)` > 'Switching users'
* Update fleetctl-CLI.md
All edits are recorded by line:
195 replaced “are” with “is”
207 replaced “will be able to” with “can”; replaced “needs to be” with “is”
249 replaced “has been” with “is”
* Update API-only user creation instructions
Added additional context to the user creation command and fixed some grammar issues.
Co-authored-by: Desmi-Dizney <99777687+Desmi-Dizney@users.noreply.github.com>
* Adding Orbit audit and new .md page
* Update Security-audits.md
Adding content. Link to PDF won't work until the PR with these two files is merged to main.
* Update Security-audits.md
Added pageOrderInSection
* Update Security-audits.md
Put link to the actual commit so the PDF link can be tested before this gets merged to main
* Update Security-audits.md
Added title
* Fixed tables
* a -> an
Co-authored-by: Eric <eashaw@sailsjs.com>